First you need to get the ratio of how far it is off.
For a gear change only then you can divide the new gear by the old gear- for example 4.55/3.55 would be 1.28
For changes to a combination of things such as trans, gear and tires then the easiest way to get the error is to drive the car. What I've done is to use highway mile-markers to figure out the speedometer reading that it takes to go 1 mile in 1 minute, or 5 miles in 5 minutes, etc. (which corresponds to 60 MPH). Divide this number by 60 to get the error- for example if your speedo reads 78 MPH at an actual speed of 60 MPH, then divide 78/60 and you get 1.3
Pull the speedo gear you have and count the teeth on it. Then multiply the number of teeth by the error that you calculated to get the number of gear teeth that you need. As a check, if your speedometer is reading too high then you will need more teeth on the speedo gear.
Walt