Rounding a number to the nearest 5 or 10 or X March 12, 2023 by Tarik It’s simple math. Given a number X and a rounding factor N, the formula would be: round(X / N)*N