A planet doesn't just orbit its star. They both orbit their shared center of mass, so the star makes a tiny circle of its own. When the star swings toward us its light shifts slightly blue; when it swings away the light shifts red. Measure that shift night after night and you can weigh a planet you can't see.
See the wobble
The star's motion is exaggerated so you can see it. The real wobble of the Sun caused by Jupiter is about 12.5 m/s, a world-class sprinter's top speed. Earth's pull adds just 0.09 m/s.
Units cheat sheet: what do m/s, M☉, AU and g/cm³ mean? (Tip: tap any underlined value on this page for a plain-language translation.)
m/s
Meters per second. 1 m/s ≈ 2.2 mph, a slow walk. A car on the highway goes about 30 m/s.
K
Here K means the star's top wobble speed toward or away from us, in m/s. (Not kelvin!)
M☉
One Sun mass: 333,000 Earths, or 1,048 Jupiters.
M⊕ / Earth masses
One Earth mass, 6 × 10²⁴ kg. Jupiter is 318 Earth masses; Neptune is 17.
AU
Astronomical unit: the Earth–Sun distance, 150 million km.
g/cm³
Grams per cubic centimeter, a unit of density. Water is 1, rock is about 3, Earth (squeezed by its own gravity) is 5.5, iron is 7.9.
nm
Nanometer, a billionth of a meter. Visible light runs from about 400 nm (violet) to 700 nm (red).
1Fit the wobble
The dots are simulated measurements built from each planet's published orbit and the measurement precision of the instrument that observed it. Every student sees the same data.
How the math works: measuring and fitting the wobble
Speed from color (the Doppler shift). Astronomers spread the star's light into a spectrum and measure where its dark absorption lines sit. A line at wavelength λ shifts by
Δλ = λ × v ÷ c where c = 300,000,000 m/s is the speed of light.
A shift toward blue means the star is coming toward us; toward red means it's moving away. Each dot on the plot is one night's measured speed. The error bar shows how uncertain it is.
The model: a wave. For a circular orbit, the star's speed toward or away from us rises and falls like a sine wave:
v(t) = K × sin(2π × (t − t₀) ÷ P) Your three sliders set the wave: P is the time for one full wave (the orbital period), K is the wave's height (the star's top speed), and t₀ slides the wave left or right to match when the orbit started.
Scoring the fit. For each night, the computer finds how far the dot is from your curve, measured in error bars. It squares those misses and averages them. That score is called χ² ("chi-squared"):
χ² = average of [(measured − model) ÷ error bar]² About 1 means your curve passes through the dots as well as their error bars allow. Much bigger than 1 means the curve misses.
2Weigh the planet
A faster wobble means a heavier planet. A longer period means the planet is farther away, so it has to be heavier to make the same wobble.
Mplanet ≈ K × (P / 2πG)1/3 × Mstar2/3(the three steps below, combined into one formula)
How the math works: weighing a planet, step by step
Find how big the planet's orbit is. Kepler's third law (with Newton's gravity) links the period to the orbit's size, using the star's mass Mstar and the gravitational constant G:
a = ∛( G × Mstar × P² ÷ 4π² )
Find how fast the planet moves. In one period the planet travels once around a circle of radius a:
vplanet = 2π a ÷ P
Balance the seesaw. The star and planet swing around their shared center of mass, like two kids on a seesaw. The heavy one moves slowly and the light one moves fast, so mass × speed is the same for both:
Mstar × K = Mplanet × vplanet so Mplanet = Mstar × K ÷ vplanet
This assumes we see the orbit edge-on. If the orbit is tilted, we only see part of the star's motion, so the true mass is larger. That's why radial velocity alone gives a minimum mass. For planets that transit, we know the orbit is edge-on, so the mass is the real mass.
3What is it made of?
Combine your mass with the size you measured from the transit. Mass divided by volume gives density, and density hints at what a planet is made of: iron, rock, water, or mostly gas.
How the math works: density
Density is mass divided by volume. Planets are close to spheres, so
density = M ÷ ( 4/3 × π × R³ )
A shortcut using Earth. Earth's density is 5.51 g/cm³. Measuring mass and radius in Earth units:
density = 5.51 g/cm³ × (M ÷ MEarth) ÷ (R ÷ REarth)³ Because the radius is cubed, a planet twice Earth's size has 8 times Earth's volume. It needs 8 Earth masses just to match Earth's density.
Compare with materials, but use the mass too. Water is 1.0 g/cm³, rock is about 3–5.5, iron is about 8. For small planets (up to about 10 Earth masses), density is a good clue to rock versus water versus gas. Giant planets are mostly hydrogen and helium, usually 0.3–1.5 g/cm³. But a very massive one gets squeezed by its own gravity: WASP-18 b, at 10 Jupiter masses, comes out denser than Earth. A rock planet that heavy would be far smaller than Jupiter, so its Jupiter-like size tells us it is mostly gas, compressed by its own weight.