Round numbers to your desired precision with various methods
Enter a number and choose a rounding method. This tool supports rounding to decimal places, nearest integers, and other common rounding functions.
Click on any example to load it into the calculator
Rounding a monetary value to the standard 2 decimal places.
Number: 45.99
Method: To a Number of Decimal Places
Precision: 2.00
Rounding a precise measurement to the nearest whole number.
Number: 15.51
Method: To the Nearest Integer
Precision: 0.00
Rounding a large number to the nearest hundred for easier reporting.
Number: NaN
Method: To the Nearest Hundred
Precision: 0.00
Using 'Round Up' (Ceiling) to determine how many items to purchase.
Number: 4.20
Method: Round Up (Ceiling)
Precision: 0.00
floor(x), gives the greatest integer less than or equal to x. The ceiling function, ceil(x), gives the least integer greater than or equal to x.x to n decimal places, the following formula can be used: round(x, n) = floor(x * 10^n + 0.5) / 10^n. For negative numbers, the logic is slightly different, often using ceil(x * 10^n - 0.5) / 10^n.x to the nearest multiple m, the formula is round(x / m) * m. For example, to round 142 to the nearest 10, you calculate round(142 / 10) * 10 which is round(14.2) * 10 = 14 * 10 = 140.