Special relativity

Relativistic Rocket Calculator

Accelerate at 1 g halfway, flip, decelerate the rest. How long does the trip take for the crew, how long for Earth, and how fast does the ship go? Exact special relativity, computed live in your browser.

Real Larzscript running in your browser454 automated checksOpen source · MITNo sign-up · your inputs never leave your device

Plan a flip-and-burn trip

Time on the ship
—
Time on Earth
—
Top speed (at the midpoint)
—
Lorentz factor at the midpoint
—
Light needs
—
Show the Larzscript program that just ran
Run a calculation to see the exact program.

This is the real program the page sent to the Larzscript interpreter (compiled to WebAssembly) in your browser. The library it imports is the same code the automated tests check.

The relativistic rocket

Imagine a spaceship that accelerates at a constant rate a, as felt by the people aboard, for the first half of a trip, then flips over and decelerates at the same rate to arrive at rest. Special relativity gives exact formulas for this "flip-and-burn" journey. If d is the distance, define x = a·d / (2c²). Then, for each half of the trip:

cosh(aτ/c) = 1 + x   →   ship time τ = (c/a) · acosh(1 + x)
Earth time t = (c/a) · √(x(2 + x))   ·   top speed v = c · √(x(2 + x)) / (1 + x)

The whole trip takes twice each half. Because the ship's speed approaches c, the ship's clocks fall further and further behind Earth's, and long journeys become possible in short ship time.

Trip times at one g

A ship holding 1 g (9.80665 m/s²) all the way reaches these destinations in the times below. Alpha Centauri, 4.37 light-years away, is 3.58 years away on the ship and 6 years on Earth; the centre of the Milky Way is 19.8 years on the ship, though light needs 26,670 years.

DestinationDistanceShip timeEarth timeTop speed (fraction of c)
Proxima Centauri4.2465 ly3.542 years5.873 years94.965395%
Alpha Centauri4.37 ly3.582 years6.003 years95.165584%
Sirius8.6 ly4.608 years10.36 years98.295212%
Tau Ceti11.9 ly5.142 years13.7 years99.014956%
Trappist-140.7 ly7.331 years42.59 years99.896709%
the galactic centre26 670 ly19.81 years26.67 thousand years100%
the Andromeda Galaxy2.5370 × 10⁶ ly28.63 years2.537 million years100%

Verification

The trip times and top speeds are compared with 50-digit decimal arithmetic for distances from 1012 m to 25 million light-years. The function keeps the small quantity x = ad/(2c²) separate instead of forming 1 + x, which would throw away most of the digits for short trips (an early version of the library did exactly that, and the test that compared it with high-precision arithmetic caught it).

Limits: this is special relativity in flat space. It ignores fuel mass, interstellar dust and the ship's own gravity. The expansion of the universe does not enter either: it does not stretch gravitationally bound systems such as our own galaxy and the Local Group, which includes Andromeda.

Frequently asked questions

Can you really reach another galaxy within a human lifetime?

According to relativity, yes — for the travellers. Under a constant 1 g acceleration (a comfortable 'Earth gravity' the whole way) with a turnaround at the halfway point, the Andromeda Galaxy is only about 28.6 years away on the ship's clocks, even though 2.54 million years pass on Earth. The catch is the energy and the fuel, which are far beyond anything we can build.

Why does the ship's time differ so much from Earth's?

The faster the ship goes the more its clocks lag behind Earth's, by the Lorentz factor γ. With constant proper acceleration the ship's speed keeps rising toward c, so γ keeps growing, and the ship can cover enormous distances in a modest amount of its own time. Distances also appear contracted from the ship's point of view.

Does the ship exceed the speed of light?

No. Its speed approaches c but never reaches it: the ship reaches 95.16558449% of c on this trip, and 1 − v/c is still 0.0483. Each extra bit of acceleration buys less and less extra speed, but a lot more time dilation.

What does 'proper acceleration' mean?

It is the acceleration the passengers actually feel, measured by an accelerometer on board. Holding it constant at 1 g gives crew the feel of normal Earth gravity for the whole journey. It is not the acceleration an outside observer computes, which shrinks as the ship approaches light speed.

Is this the same as a real spacecraft?

No. It ignores the fuel needed — with any known propulsion, a ship that carries its own reaction mass could not sustain 1 g for years — as well as dust and radiation hazards and the expansion of the universe. Treat it as a demonstration of what relativity permits, not a mission plan.

Every number on this page is computed by the open-source larzscript-cosmos library (relativity, physconst, physmath), written in Larzscript, and checked against independent references in its test suite. How it is verified →

All physics calculators → · Science calculators hub · Chemistry calculators →