If the speedometer is off but all the gearing is right you can recalibrate the gauge. There is an arm behind the face which adjusts it my percentage and flat out moving the needle is what you'll do fix a constant offset (ie: it's ALWAYS 5 MPH low).
If the gearing does NOT match you may swap out the speedometer driven gear or worst case swap out the diff to make everything right.
You may recalibrate the gauge to make the speed report accurately without changing any gearing (diff or speedo drive gear) BUT the odometer will still be off.
When changing to a different diff the proper course of action is to change the speedometer drive gear for one the appropriate size or to install small gear box which changes rate at which the speedometer cable spins (there are actually shops that do just this).
EDIT: Here's a picture showing the adjustment arm which you may use to calibrate a speedometer which is off by a percentage (ie, you're doing 30 but it reports 33 and then when doing 60 it reports 66).