From Pottermore:
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.
(Pottermore, "Measurements").
It seems that witches and wizards can use magic to perform "laborious calculations" if they so choose.
But I don't recall an incident where we actually see this in the books. Do we ever see a witch or wizard perform any sort of mathematical calculation using magic?