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.
Plan a flip-and-burn trip
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:
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.
| Destination | Distance | Ship time | Earth time | Top speed (fraction of c) |
|---|---|---|---|---|
| Proxima Centauri | 4.2465 ly | 3.542 years | 5.873 years | 94.965395% |
| Alpha Centauri | 4.37 ly | 3.582 years | 6.003 years | 95.165584% |
| Sirius | 8.6 ly | 4.608 years | 10.36 years | 98.295212% |
| Tau Ceti | 11.9 ly | 5.142 years | 13.7 years | 99.014956% |
| Trappist-1 | 40.7 ly | 7.331 years | 42.59 years | 99.896709% |
| the galactic centre | 26 670 ly | 19.81 years | 26.67 thousand years | 100% |
| the Andromeda Galaxy | 2.5370 × 10⁶ ly | 28.63 years | 2.537 million years | 100% |
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 →