Time Dilation
Time dilation stems from Einstein’s theory of special relativity, which says that moving clocks tick more slowly by a factor (called the Lorentz factor). At everyday speeds, the Lorentz factor is approximately one, so the effect is negligible. Near light speed, it becomes dramatic. Here’s the Lorentz factor formula showing how the factor increases with speed:
$$ \begin{aligned} &\gamma = 1/\sqrt{1 - v^2/c^2}\\ &\text{where}\\ &\hspace{1em}\gamma = \text{Lorentz factor}\\ &\hspace{1em}v = \text{relative velocity between two objects}\\ &\hspace{1em}c = \text{speed of light} \end{aligned} $$Project Hail Mary
The ship in Project Hail Mary (the Book and Movie) travels at about 92% of light speed, so the Lorentz factor is approximately 2.55. In reality, the ship would most likely accelerate for half the trip and decelerate for the rest, but let’s keep it simple using constant velocity. One year on the ship corresponds to about 2.55 years outside it. That’s why a journey that feels like a few years to Grace can become more than a decade for Earth.
What Happens If You Make a Round Trip?
Check out this silly animated video I made about it.
In the linked video above, the “traveler” (the one in the ship) makes a round trip to a fictional Earth-like planet, 50 light years away. The velocity is around 99% the speed of light given the traveler barely ages, farther and faster than Grace. In the graph below, you can see that means the traveler aged ~14 years, while the stationary observers aged 100 years (passing away).
What If You Go Even Faster?
One thing I found interesting while digging into this is: to stationary observers, the distance in light years is also the minimum time objects can travel to them (because a light year is the distance light travels in one year). According to special relativity, no object can travel faster than light; the traveler is just experiencing time slower. Therefore, no matter how fast you go, the stationary observer will experience a delay at least equal to the distance in light years.
Even at 99.99% c, 1 year to the traveler is still around 50 years to the stationary observers (but the difference is a whopping 50x). See the chart below to compare the result of different velocities (and check out this calculator to compare other numbers).
Why Time Dilation Is Ignored In Most Popular Media Space Travel
First off, none of the velocities mentioned above are possible for a spaceship with current technology, especially while carrying a human and all the equipment that requires. But the problem is mostly due to a lack of efficient fuel and materials to get up to speed. That’s why Andy Weir (author of the original Project Hail Mary book) brings in Astrophage as a magic fuel that just works.
Time dilation also has an interesting implication that going at high velocities is essentially time traveling to the future (with no way to go back). It’s impractical for most stories to travel one way to the future, so many popular sci-fi media just completely skirt around time dilation by inventing some form of “Faster than Light” travel.