Calculating the masses of stars
For binary stars Kepler’s third law reads M₁ + M₂ = a³ / P², where a is the semi-major axis of the relative orbit (AU), P the period (years) and masses come out in solar masses. For example in the Sirius system a ≈ 19.8 AU and P ≈ 50.1 years, giving M₁ + M₂ ≈ 3.1 M☉ (in fact Sirius A ≈ 2.06 M☉, Sirius B ≈ 1.02 M☉). To find the individual masses use the centre-of-mass relation M₁ / M₂ = a₂ / a₁ (a₁ + a₂ = a): the closer a star is to the centre of mass, the more massive it is. This is how stellar masses from ≈ 0.08 to ≈ 150 M☉ have been established, and the mass–luminosity relation (L ∝ M³·⁵) was built from such data. For single stars, whose mass cannot be measured this way, the mass is estimated from the spectrum and luminosity using models.
Calculation: for the Alpha Centauri system a ≈ 23.4 AU and P ≈ 79.9 years: compute a³ and P² on a calculator and check that the total mass comes to ≈ 2 M☉.