Light always travels at c through flat space, but general relativity says mass curves spacetime, and a curved metric changes how much coordinate time a light ray needs to cross a given coordinate distance. Near a mass M, the Schwarzschild metric stretches radial and time coordinates, so a pulse passing close to M takes measurably longer than the flat-space estimate (r₁+r₂)/c — even though its local speed is still exactly c. This is the Shapiro time delay, the fourth classical test of general relativity (Irwin Shapiro, 1964).
For a ray whose closest approach (impact parameter) b is much smaller than the source/target distances r₁, r₂ from the mass, the extra one-way travel time is:
Δt = (4GM/c³) · ln(4·r₁·r₂ / b²)
G = 6.674×10⁻¹¹ N·m²/kg²
c = 2.998×10⁸ m/s
M = central mass
b = impact parameter (closest approach to M)
r₁, r₂ = distances from M to the two endpoints
- Mass slider — sets M in solar masses. Bigger M curves spacetime more and lengthens the delay logarithmically... but linearly in the prefactor GM/c³.
- Impact parameter b — how close the ray grazes the mass. Because the delay depends on ln(1/b²), it grows sharply as the ray skims closer to the surface.
- r₁, r₂ sliders — distances from the mass to the transmitter and the reflecting target (Earth, a planet, a spacecraft, or a pulsar's companion).
- Presets — load real solar-system numbers: the 1964–1968 Earth–Mercury/Venus radar-echo tests that first confirmed GR's prediction, the Cassini spacecraft's 2002 measurement (agreement with GR to 2×10⁻⁵), and a compact-object case relevant to pulsar-timing delay measurements.
- The 3D view shows the pulse's true straight-line trajectory but visibly slows it down while it is near the mass, and the impact-parameter offset is exaggerated so the near-miss is visible — real solar-limb grazing distances are far too small relative to interplanetary distances to render to true scale.
Shapiro delay is not just historical: GPS, deep-space navigation and pulsar-timing arrays searching for gravitational waves all have to correct for it to stay accurate.