Nobody has ever weighed the Sun. We timed something going round it instead.
A satellite 400 km up takes 1 hour 32 minutes to go round. That number, and nothing else, is how the mass of the Earth is known.
Open the orbital period calculator at its default: a semi-major axis of 6,771 km around the Earth, which is the International Space Station at an altitude of 400 km. It reports a period of 1.54 hours, or 1 h 32 m 25 s.
Notice what you were not asked for. Not the station's mass. Not what it is made of, or how big it is. The tool has a box for the central body and a box for the size of the orbit, and that is the whole input.
That absence is the entire method.
The mass that cancels, and the mass that does not
Set a small mass m going round a large mass M at radius a. Gravity supplies the centripetal force:
GMm/a² = m·(4π²a)/T²
The orbiting mass appears on both sides and divides out, which leaves Kepler's third law with Newton's constant in front:
T² = 4π²a³/(GM) ⟹ M = 4π²a³/(GT²)
Two things follow, and they are the reason astronomy has any numbers at all.
First, since m has vanished, the period cannot tell you anything about the orbiting body. A bolt and a space station at the same altitude keep identical time. That is why the tool never asks.
Second, M has not vanished. Measure a and T — both of which are geometry and a clock, the two things astronomers can actually do — and the mass of the central body falls out. Change the central body in the tool's selector while holding the semi-major axis fixed and the period changes: that is the mass being read.
So the Sun has never been weighed. It has been timed. So has the Earth, so has Jupiter, so has every star with a companion, so has the black hole at the centre of this galaxy, timed by the orbits of stars around it over decades.
The exponent is the fingerprint
The tool prints a scaling table beneath the readout, and it is worth reading as a claim rather than a convenience. Double the semi-major axis from 6,771 km to 13,542 km and the period goes from 1.54 h to 4.36 h — a factor of 2.83, which is 23/2 = 2√2. Quadruple it and the factor is exactly 8.
That 3/2 power is what makes the method trustworthy. If gravity fell off as some other power of distance, the exponent in the table would be different, and it would be different in a way that no amount of calibration could hide. Every satellite, every moon and every planet is a repeat of the same experiment at a new radius, and they all sit on the same line. The law is not fitted to the data; the data is thousands of independent chances to break it.
And then the galaxies did not fit
Which brings us to the one thing this method cannot do, and what happened when it was pushed there.
M = 4π²a³/(GT²) gives you the mass inside the orbit. All of it, whatever it is, wherever it is, in one number, and nothing about what it is made of. The method is blind to composition by construction, because gravity is.
Apply it to a spiral galaxy by timing the stars in its outskirts, and the mass that comes out is several times the mass of everything visible. The stars in the far suburbs orbit far too quickly for the light you can see. Either the equation fails at that scale, or there is mass there that does not shine. Every other application of the equation — every satellite, every moon, every binary star — argues that the equation is fine, which leaves the other option.
Dark matter is, in origin, a discrepancy in exactly this calculation. It was not detected; it was inferred from a mass that would not balance, using the one equation that measures mass without asking what it is.
One footnote for anyone who goes looking at the reference tables: they list GM rather than M, and to far more digits than either factor separately. That is not fussiness. Timing an orbit measures the product GM to about nine significant figures, while G itself — measured in a laboratory with hanging weights — is known to barely five. The Sun's mass in kilograms is one of the least precise numbers in astronomy, and it is imprecise entirely because of a constant measured on a bench in a basement, not because of anything happening in the sky.
References (1)
- why the tables list GM rather than M, and to far more digits Luzum et al. (2011). The IAU 2009 system of astronomical constants. Celestial Mechanics and Dynamical Astronomy 110(4).