Arithmetic & Number Theory

Round to Nearest Multiple

Round x to the nearest multiple of m.

Formula

Formula
y = m · round(xm)

Variables

SymbolDefinitionType & rangeUnitsRole
x value to round real number (ℝ) input
m multiple nonzero real (m ≠ 0) input

Try it yourself

Interactive calculator
Result

Worked examples

Example 1
Givenx = 47, multiple m = 5
Result45
Example 2
Givenx = 123, multiple m = 25
Result125