Well, this is a very interesting question….
From a ‘classical’ viewpoint (i.e. the world in which we live) this is easily calculated by multiplying the speed of light, c, with the laser pulse duration.
So, for a Q-switched Nd:YAG laser of, say, 5 nanosecond duration, the laser pulse is approx. 1.49 metres long, while a picosecond laser of 350 ps will generate a beam of length 10.5 cm (assuming the speed of light is 2.997 x 10^8 metres per second).
So far, so easy.
However, if you managed to hitch a ride on a photon in one of these beams then things start to get very strange. We are no longer in the classical world but rather in the relativistic world, as described by Einstein in his theory of Special Relativity.
In that world we need to consider the Lorentz transformations – time slows down, length contracts and mass increases etc….
where γ is the amount of change due to the velocity, v, in the direction of that velocity.
If the velocity of the photon is ‘c’, then γ becomes infinity! This has the very strange effect of reducing the beam length to zero!!!
In other words, if you are sitting on a photon of light then you are effectively in a two-dimensional plane – you can see everything to the left and right of you, and above and below you. But there is nothing in front of or behind you anymore, except….
According to Einstein’s theory this only occurs from the viewpoint of the observer – not the traveller. The photon-rider will still see everything as normal, but the observer sees something quite different.
Oh, and incidentally, time stops. For the observer. Not the traveller. But that’s another issue altogether….