Lorentz Transformation Calculator (Spacetime Coordinates)
Transform spacetime coordinates between inertial frames moving at velocity v.
Get x', t', γ, β, plus length contraction and time dilation.
Coordinates from one frame to another
The Lorentz transformation gives the spacetime coordinates of an event measured in two different inertial frames moving at constant velocity relative to each other. If frame S’ moves at velocity v along the x-axis relative to frame S, and the origins coincide at t = t’ = 0, then an event with coordinates (x, t) in S has coordinates (x’, t’) in S':
x’ = γ(x − v t) t’ = γ(t − v x / c²) y’ = y, z’ = z (unchanged, perpendicular to motion)
Where γ = 1 / √(1 − v²/c²) is the Lorentz factor and c is the speed of light (≈ 2.998 × 10⁸ m/s). The inverse transformation (from S’ back to S) flips the sign of v:
x = γ(x’ + v t’) t = γ(t’ + v x’ / c²)
This is the mathematical heart of special relativity. It replaces the Galilean transformation x’ = x − vt, t’ = t that worked for everyday speeds. The Galilean version is what your intuition expects; the Lorentz version is what nature actually does.
Why time mixes with space
In Galilean mechanics, time is the same in every frame: a clock on a moving train ticks at the same rate as a clock at the station. The Lorentz transformation breaks this assumption. The formula for t’ shows that the new time depends on x, the spatial coordinate. Events at the same time in frame S do not occur at the same time in frame S’. This is the relativity of simultaneity, and it is the deepest single shift in moving from Newtonian to Einsteinian physics.
For everyday speeds (v ≪ c), the term v x / c² is tiny, so t’ ≈ t and the Galilean approximation holds. At a speed of 30 m/s (a fast car), the term v/c² is about 3 × 10⁻¹⁶ per meter. Over a kilometer of distance, time shifts by only 3 × 10⁻¹³ seconds, a third of a picosecond. For v near c, the effect becomes enormous and dominates everything from GPS satellite clocks to particle accelerator physics.
Length contraction and time dilation are consequences
The Lorentz transformation contains length contraction and time dilation as special cases. Consider a rod of rest length L₀ in frame S’, moving with that frame at velocity v relative to S. In S, you measure both ends of the rod at the same instant t = constant. Using x’ = γ(x − vt), the difference in x’ coordinates of the two ends (both measured at one instant in S) is γ times the length you measure, so the measured length L is L = L₀ / γ. The rod is shorter in the lab frame than in its own rest frame.
For time dilation, consider a clock at rest in S’ ticking at intervals of one second (Δt’ = 1). In S, the clock is moving. Using t = γ(t’ + v x’/c²) with x’ = 0 (since the clock is at the origin of its own frame), Δt = γ Δt’. A second on the moving clock takes γ seconds in the lab. The moving clock runs slow by the factor γ.
These two effects are inseparable: they are the two faces of the same coordinate transformation. The Lorentz transformation does not just imply them; it is them, in coordinate form.
A worked example: a particle at v = 0.6c
A muon detector sits at x = 0 in the lab (frame S). A muon at rest in its own frame S’ moves past at v = 0.6c. At t = 5 microseconds in the lab, the muon’s worldline crosses x = 900 m. What are the muon’s own time t’ and position x’ at this event?
γ = 1 / √(1 − 0.36) = 1 / √0.64 = 1 / 0.8 = 1.25
t’ = γ(t − vx/c²) = 1.25 × (5×10⁻⁶ − 0.6 × 3×10⁸ × 900 / (3×10⁸)²) = 1.25 × (5×10⁻⁶ − 1.8×10⁻⁶) = 1.25 × 3.2×10⁻⁶ = 4.0 microseconds
x’ = γ(x − vt) = 1.25 × (900 − 0.6 × 3×10⁸ × 5×10⁻⁶) = 1.25 × (900 − 900) = 0 meters
The muon is at the spatial origin of its own frame (as expected, it is at rest there) and the muon’s own clock reads 4.0 microseconds, while the lab clock reads 5.0 microseconds. The muon’s clock has ticked γ × less than the lab’s clock: 4.0 = 5.0 / 1.25.
This is exactly what cosmic-ray muons exhibit. They are produced about 15 km up in the atmosphere with a rest-frame half-life of 1.5 microseconds. In their own frame they should travel only about 450 meters before half decay. But in the Earth’s frame, time dilation extends their lifetime by γ, and many of them reach sea level for us to detect. The discrepancy between 450 m and 15 km is exactly accounted for by γ ≈ 30 at typical cosmic-ray muon energies.
Reference frame conventions
This calculator uses the standard convention: frame S’ moves at velocity v along the positive x-axis of frame S. Positive v means S’ moves to the right. Negative v reverses it. The coordinate axes (x, y, z) are aligned between frames, and the origins coincide at t = t’ = 0. With these choices, the transformations have the standard textbook form.
The y and z coordinates do not change because the motion is purely along x. If you want a Lorentz transformation in a different direction, you can either rotate your coordinate system to put motion along x or use the general boost matrix form.
Common confusions
The Lorentz factor γ depends only on the relative speed |v|, not its direction. A train moving toward you and a train moving away from you both produce the same γ (and the same time dilation and length contraction). What differs is the relativistic Doppler shift, which depends on direction as well as speed.
Each observer sees the other’s clock running slow. This sounds paradoxical (which clock is “really” slow?), but it is consistent because each observer’s “slow” refers to a different set of events. The full resolution requires considering specific spacetime events and the relativity of simultaneity. The twin paradox is the famous version that adds an acceleration phase (the traveling twin’s frame is non-inertial during turnaround), which breaks the symmetry.
The Galilean limit. As v approaches 0, γ → 1 and the transformations reduce to x’ = x − vt, t’ = t. Special relativity does not replace Newtonian physics; it contains it as the low-velocity limit.
Useful identities
- γ² (1 − β²) = 1, where β = v/c (Lorentz invariant)
- x² − (ct)² = x’² − (ct’)² (spacetime interval is invariant between frames)
- For an object at rest in S’ (x’ = 0): x = vt, so the object moves with velocity v in S. (Confirms the setup.)
- Velocity addition: u_x’ = (u_x − v) / (1 − u_x v / c²), where u_x is the velocity of some object as measured in S. This is how velocities transform, and it ensures nothing exceeds c.