Arithmetic & Number Theory
Round to Nearest Multiple
Round x to the nearest multiple of m.
Formula
Formula
y = m · round(xm)
Variables
| Symbol | Definition | Type & range | Units | Role |
|---|---|---|---|---|
| x | value to round | real number (ℝ) | — | input |
| m | multiple | nonzero real (m ≠ 0) | — | input |
Try it yourself
Interactive calculator
Worked examples
Example 1
Givenx = 47, multiple m = 5
Result45
Example 2
Givenx = 123, multiple m = 25
Result125