The accuracy of a speedometer is tightly related to the tire diameter, which, as you can imagine, can be greatly affected when we talk about a variety of things, such as pressure, temperature, or load.
The values are mentioned in the regulation's testing procedure, and if you wish to make any changes, you are obligated to take that into consideration. Modern-day speedometers use a sensor to calculate the speed from the frequency of the signal.
While the diameter of the tire doesn't impact the speedometer, in case that the sensor is in the transmission, when you change the gear, you may change the way the reading is done.
Generally speaking, experts and lovers of motorcycles don't recommend that you try to calibrate a motorcycle speedometer, especially by yourself, since the results may not be what you wanted, but if you really need to, you can find exceptions to those rules.