The way that I would solve this, is by using %.
If your speedo reads 65, when your actually going 55, it's 1.181818 off, if you multiply 22 teeth X that, you will get 26 teeth and that should get the right mph.
I have rarely had the right size tire on any of my cars or trucks and what I did, in the olden days, was use a stop watch, over a 1 mile marker. 60 mph = 1 mile per minute or 60 sec. If you clock yourself at 55 sec. 60 sec/55 sec = 1.0909. 1.0909 x 60 mph = 65.45 true mph. Once you know the percentage that your speedo is off. in this case we'll call it 109.1% you can calculate the rest of your speedo readings. i.e. 20 mph x 1.091 = 21.82 mph or 100 speedo reading would bw 109.1 mph.
For my truck, it just happened to be a easy percentage ~110%. Holding the speedo at 60, I covered 1 mile in 54.5 sec. 60/54.5 = 1.100 x 60 = 66.055 mph so, I would just add 10% to my speedo reading.
The other way I do it, is with gearing and a tach. rpm/final drive gear x .002975 x tire dia = mph. 4000 rpm/4.11 = 973.24 x .002975 = 2.895 x 28 tire dia = 81.07 mph.
You can correct for the speedo gear, with any of these %. In the last case, if you speedo said 100 mph at 4000 rpm, 100/81.07 = 1.2335 x 22 teeth = 27.137, so a 27 tooth gear, would get you very close.
Lastly, if your speedo is accurate and you change tires. You can calculate how much your speedo is off or calculate the speedo gear teeth, needed to bring it back, as close as you can. In that case, we'll say you go from a 215 60 15 (25.157 dia) to a 235 60 15 (26.10 dia). Here you have to speed the speedo up to match the speed increase and need a gear with less teeth. 26.10/25.157 = 1.038 or 103.8%. 22 teeth / 1.038 = 21.205 so, a 21 tooth gear would get you close.