Rounding a number to the nearest 5 or 10 or X

It’s simple math. Given a number X and a rounding factor N, the formula would be:

round(X / N)*N

Leave a Comment