"The gold ones are Galleons. Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it's easy enough."
-- Rubeus Hagrid (PS5)
Wizards can do math without calculators. They don’t mind difficult and complicated mathematical calculations because they can work them out magically, with virtually no effort (Pm). For example, they have not trouble managing a complicated system of money while shopping in Diagon Alley (PS5).
Just as British witches and wizards do not use electricity or computers, they have never turned metric. They are not governed by the decisions of the Muggle government, so when the process of metrication (switching to metric measurements) began in 1965, witches and wizards simply ignored the change.
Witches and wizards are not averse to laborious calculations, which they can, after all, do magically, so they do not find it inconvenient to weigh in ounces, pounds and stones; measure in inches, feet and miles; or pay for goods in Knuts, Sickles, and Galleons.
This appears to be almost automatic, involuntary, rather like our being able to read means we do it without thinking whenever we see text. As such there doesn't seem to be any specific spell involved. Interestingly, this may explain why kids in the wizarding world don't have to take math classes. They develop this magical ability during their pre-Hogwarts years and only study more advanced "math" in the form of Arithmancy -- numbers as magical symbols -- as an elective.