mround

math

Rounds to the nearest multiple

Syntax

mround(number, multiple)

Parameters

number (number)

The number to round

multiple (number)

The multiple to round to

Returns

number

The number rounded to the nearest multiple

Examples

Input:
17 | mround(5)
Output:
15
Input:
23 | mround(10)
Output:
20
Input:
mround(47, 5)
Output:
45

The mround() function rounds a number to the nearest multiple of a specified value.

Usage

Use mround() when you need to round values to specific increments, such as rounding prices to the nearest $5 or quantities to standard package sizes.

Related Functions