This question already has an answer here:
Let's suppose we have a spaceship with the exact speed of light. If a traveller takes this spaceship to go to proxima centauri (approximately 4 years light away from Earth) and come back, we (as observers on Earth) will see the ship coming back after approximately 8 years.
But how much time would have passed for the traveller on the ship? How can be this calculated with a formula?