The arithmetic
A speedometer counts wheel revolutions and multiplies by an assumed distance per revolution. Change the tire's overall diameter and the real distance per revolution changes while the assumption does not, so the reading is wrong by exactly the ratio of the two diameters.
True speed is the indicated speed times the new diameter over the old. A tire two percent taller makes the speedometer read two percent low: at an indicated 70 mph you are doing 71.4. The odometer moves the same way, undercounting distance by the same ratio.
The assumption that matters more than the arithmetic
Every speedometer error figure, here and everywhere else, assumes the instrument read correctly on the original size. Many vehicles leave the factory reading slightly high on purpose, because regulations in several markets forbid a speedometer from under-reading and allow it to over-read. A vehicle that read three percent high on the original size and is fitted with a two percent taller tire is now reading about one percent high, not one percent low.
So a computed speedometer error is a change from whatever the instrument did before, not an absolute claim about what it now shows. The only way to know the absolute error is to check the indicated speed against a satellite-derived one.
What else is counting revolutions
The speedometer is the visible consumer of wheel revolutions, not the only one. Indirect tire pressure monitoring compares wheel speeds. Stability and traction control compare wheel speeds. Adaptive cruise control and lane keeping use vehicle speed. Trip computers, fuel economy figures and service intervals all key off distance.
None of that makes a diameter change unsafe on its own. It does mean a size change is a vehicle-level decision rather than a tire-level one, and that a big change is worth discussing with someone who can recalibrate what needs recalibrating.