CalcOpenly
English

Astronomy calculator: light time, magnitudes and redshift

Light travel time for any distance, apparent and absolute magnitude from the distance modulus, and redshift to recession velocity (relativistic Doppler).

Drafted with AI writing toolsUpdated Checked examples: 9

Try
Light travel time
8 min 19 s
Light travel time: 8 min 19 s
Light travel time
8.31675min
Distance
149,598,000km

Light from the Sun takes 8 min 19 s to reach us: we see it as it was that long ago.

Light travel time (log₁₀ seconds)

secondsminutes–hoursdaysyearsthousands to billions of years-11.84.97.510.517MoonThe SunProxima CenAndromeda8 min 19 s
How it's calculated S
  1. Distance in metres

    d=149,598,000,000 md = 149{,}598{,}000{,}000\ \mathrm{m}
  2. Divide by the speed of light

    t=dc=149,598,000,000299 792 458=499.005 s=0.0000158125 yrt = \frac{d}{c} = \frac{149{,}598{,}000{,}000}{299\,792\,458} = 499.005\ \mathrm{s} = 0.0000158125\ \mathrm{yr}

    Years here are Julian years (365.25 d), the unit that defines the light-year.

About the astronomy calculator

Light travel time is the distance divided by the exact speed of light, 299,792,458 m/s. The distance modulus, m − M = 5 log₁₀(d/10 pc) + A, links a star's apparent magnitude m, its absolute magnitude M (how bright it would look from 10 parsecs), its distance d and the dimming A by dust; give any two of m, M and d to get the third. Redshift z converts to velocity with the relativistic Doppler formula 1 + z = √((1 + β)/(1 − β)), where β = v/c.

The default shows sunlight taking 8 min 19 s to cross 1 au (149,597,870.7 km), so we see the Sun as it was that long ago. Sirius, at apparent magnitude −1.46 and 2.64 parsecs, has absolute magnitude 1.43; from the same distance the Sun would shine at magnitude 1.94.

The Doppler formula treats redshift as motion through space. Beyond z ≈ 0.1 a galaxy's redshift comes mainly from cosmic expansion, so the velocity shown is not its recession speed and its distance needs a cosmological model.

How long does light take to travel a distance?

Divide the distance by the speed of light, exactly 299,792,458 m/s: t = d/c. Sunlight crosses 1 astronomical unit (149,597,870.7 km) in 499.005 s, about 8 min 19 s, and moonlight takes 1.28 s from 384,400 km. A light-year is one Julian year of light travel.

Light travel times from the Moon to Andromeda

  • Moon, 384,400 km: 1.28 seconds
  • Sun, 1 au: 8 minutes 19 seconds
  • Proxima Centauri, 4.2465 light-years: 4.2465 years
  • Galactic center, 8,178 parsecs: 26,673 years
  • Andromeda galaxy, 765,000 parsecs: about 2.5 million years

The travel time is also the age of the light, so you see the Sun as it was 8 min 19 s ago. That figure is for the mean distance of 1 au; Earth sits slightly closer to the Sun in January and farther in July.

The distances come from NASA's Moon fact sheet, the IAU astronomical unit, Gaia DR3 for Proxima Centauri, the GRAVITY collaboration's 2019 Galactic-center measurement and NASA/ESA's figure of about 765 kpc for Andromeda.

Light-years, parsecs and astronomical units

  • 1 astronomical unit = 149,597,870.7 km exactly (IAU 2012).
  • 1 light-year = 9,460,730,472,580.8 km, the distance light travels in 365.25 days.
  • 1 parsec = 648,000/π au = 206,264.8 au = 3.26156 light-years (IAU 2015).

A parsec is the distance at which 1 au spans one arcsecond, which is why parallax distances come out in parsecs.

How to find distance from apparent and absolute magnitude

Apparent magnitude m is how bright an object looks from Earth. Absolute magnitude M is how bright it would look from 10 parsecs. The distance modulus links them: m − M = 5 log₁₀(d / 10 pc) + A, where A is dimming by dust.

Solved for distance, d = 10^((m − M − A + 5)/5) parsecs. A star with m − M = 10 and no dust lies 10³ = 1,000 pc away, about 3,261.56 light-years.

The scale runs backward and is logarithmic: five magnitudes is a factor of exactly 100 in brightness, so one magnitude is 100^(1/5) ≈ 2.512 (OpenStax).

The same equation works in reverse. The Sun, M = 4.83, seen from 1 au (4.848 × 10⁻⁶ pc) has m = 4.83 + 5 log₁₀(4.848 × 10⁻⁶ ÷ 10) = −26.74, its observed brightness.

How dust extinction changes the distance

Interstellar dust dims starlight, adding A magnitudes to m. Leave it out and every magnitude of dimming is read as extra distance.

With m − M = 10, one magnitude of extinction brings the distance down from 1,000 pc to 631 pc. Setting A to zero would overstate that distance by 58%.

Extinction depends on the line of sight and on the photometric band, so use a value measured for your object in the same band as m and M.

How to convert redshift to velocity

Redshift is the fractional stretch of a wavelength: z = (λ_observed − λ_emitted)/λ_emitted. A line emitted at 500 nm and observed at 550 nm has z = 0.1.

For motion along the line of sight, the relativistic Doppler formula gives β = ((1 + z)² − 1)/((1 + z)² + 1) and v = βc. At z = 0.1, β = 0.0950 and v = 28,487 km/s.

The shortcut v = cz gives 29,979 km/s, 5% too high. At z = 0.01 the two differ by only 0.5% (2,983 against 2,998 km/s), but at z = 1 the shortcut says c while the Doppler formula gives 0.6c.

Negative z is a blueshift from an approaching source: z = −0.1 means 31,470 km/s toward you. In reverse, a source receding at 0.5c shows z = √3 − 1 = 0.732 (OpenStax).

Beyond z ≈ 0.1, a galaxy's redshift comes mainly from the expansion of space. Its Doppler velocity is then not its recession speed, and its distance needs a cosmological model such as ΛCDM with a value of H₀.

Light time, distance and redshift results

Default is sunlight over 1 au, and Moon is 384,400 km. One light-year is a typed distance of 1 ly. Distance modulus ten uses m = 10 and M = 0 with no dust, and Doppler z1 is a redshift of 1.

ScenarioSelected result
Default8.31675 minutes
Moon1.28222 seconds
One light-year1 year light time
Distance modulus ten1,000 pc
Doppler z10.6c

Common mistakes

  • Reading a light-year as a time. It is a distance of about 9.46 trillion km.
  • Assuming a bigger magnitude is brighter. Magnitude 1 is 2.512 times brighter than magnitude 2.
  • Mixing photometric bands. Compare m and M in the same band; the Sun's 4.83 is a visual (V) magnitude.
  • Using v = cz at large redshift. It overshoots, reaching c at z = 1.

Units and conventions

  • Light-time distances accept km, au, light-years, parsecs and miles; magnitude distances accept pc, ly and au.
  • Light travel in years uses Julian years of 365.25 days, the unit that defines the light-year.
  • Extinction A is in magnitudes and is added to the apparent magnitude.
  • Velocities can be in km/s, m/s or fractions of c, and must stay below c.

For orbital speeds and periods around a planet or star, use the gravity and orbit calculator. To turn an observed wavelength into frequency or photon energy, use the wavelength, frequency and energy calculator.

Worked examples

Sunlight takes about 8 min 19 s

Calculate
Light travel time
Distance to
The Sun
Light travel time
8.31675 min
Distance
149,598,000 km

Checked against: 149597870700 m / 299792458 m/s = 499.00478 s (IAU au, exact c)

Moon: 1.28 light-seconds

Calculate
Light travel time
Distance to
Moon
Light travel time
1.28 s

Checked against: 384400 km / c = 1.2822204 s

One light-year takes one Julian year

Calculate
Light travel time
Distance to
Enter a distance
Distance
1 ly
Light travel time
1 year

Checked against: IAU definition: 1 ly = c × 365.25 d

Apparent magnitude of the Sun

Calculate
Stellar magnitudes
Solve for
Apparent m
Absolute magnitude M
4.83
Distance
1 au
Apparent magnitude m
-26.742
Distance modulus m − M
-31.572

Checked against: 4.83 + 5 log₁₀(4.848137e-6/10) = −26.742 (observed −26.74)

Questions

How long does light take to reach Earth from the Sun?

8 minutes 19 seconds on average (499.0 s): 1 astronomical unit is exactly 149,597,870,700 m (IAU 2012) and light travels exactly 299,792,458 m/s. Earth's distance from the Sun varies from about 147.1 to 152.1 million km, so the delay ranges from roughly 8 min 11 s in January to 8 min 27 s in July. Moonlight takes 1.28 s.

What is the difference between apparent and absolute magnitude?

Apparent magnitude m is how bright a star looks from Earth; absolute magnitude M is how bright it would look from a standard 10 parsecs (32.6 light-years). The scale runs backwards and is logarithmic: 5 magnitudes is exactly a factor of 100 in brightness, so 1 magnitude is 100^(1/5) ≈ 2.512 times. The Sun is m = −26.74 from Earth but only M = 4.83.

How do you calculate distance from magnitudes?

d = 10^((m − M − A + 5)/5) parsecs, the distance modulus solved for d. A star with m − M = 10 and no dust lies at 10³ = 1,000 pc, about 3,262 light-years. Every 5 magnitudes of difference multiplies the distance by 10; Cepheid variables and Type Ia supernovae, whose absolute magnitudes are known, are measured this way.

How do you convert redshift to velocity?

Use the relativistic Doppler formula, β = ((1 + z)² − 1)/((1 + z)² + 1), then v = βc. At z = 0.1 that gives 28,487 km/s, 5% below the simple estimate cz = 29,979 km/s, and at z = 1 it gives 0.6c, not c. For distant galaxies the redshift is cosmological, so a Hubble-law or ΛCDM calculation replaces this formula.

How far is a light-year?

9,460,730,472,580.8 km, the distance light travels in one Julian year of 365.25 days, as defined by the IAU. A parsec is 3.2616 light-years, or 648,000/π astronomical units (IAU 2015 Resolution B2). Proxima Centauri, the nearest star after the Sun, is 4.2465 light-years away, so its light is 4.25 years old when it arrives.

About this calculator

t=dc;m−M=5log⁡10d10 pc+A;1+z=1+β1−β, β=vct = \frac{d}{c};\qquad m - M = 5\log_{10}\frac{d}{10\ \mathrm{pc}} + A;\qquad 1 + z = \sqrt{\frac{1 + \beta}{1 - \beta}},\ \beta = \frac{v}{c}

Sources

  1. IAU 2012 B2 (astronomical unit), IAU 2015 B2 (parsec = 648000/π au); c exact (SI)
  2. OpenStax Astronomy 2e, §17.1 The brightness of stars (magnitudes) and §19.1 Fundamental measures of distance
  3. OpenStax University Physics Volume 3, §5.7 Doppler effect for light

Checked against references

This calculator includes 9 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.