 Doppler redshift

 
This calc uses standard methods to take relativity into account while calculating the Doppler shift of electromagnetic radiation. The "object speed" is only the speed in the radial direction (i.e. away from the observer  use a negative value for travel towards the observer).
 
The doppler redshift, even including relativistic terms, is not the only factor producing redshift in astronomical bodies. It is the most important for nearby objects, but for more distant bodies Hubble redshift (arising from the expansion of the universe) becomes more important. Gravitational redshift is also very significant in some cases.  