Round, floor, and ceil to a chosen precision.
Free to use, no sign-up required. Rounding Tool is one of 198 tools built into Xenition, alongside a chat that can use them for you.
Rounds a number to a chosen number of decimal places three ways at once: to the nearest value, always down, and always up. Useful for prices, measurements and checking spreadsheet results.
The number is multiplied by 10 to the power of the decimal places, passed through Math.round, Math.floor or Math.ceil, and divided back. Math.round sends an exact half upward toward positive infinity, so 2.5 becomes 3 and −2.5 becomes −2. Floor and ceil move toward negative and positive infinity, so for negatives floor makes the number more negative.
2.4671 to 2 decimal places gives Round 2.47, Floor 2.46 and Ceil 2.47. For −2.4671 the results are −2.47, −2.47 and −2.46.
Computers store 1.005 in binary as slightly less than 1.005, so it sits just below the halfway point and rounds down. This tool uses standard floating-point arithmetic and shows that behaviour, as spreadsheets and most languages do.
They agree for positive numbers. For negatives, floor goes down, so −2.46 floors to −3 at 0 decimals, while truncating would simply drop the decimals and give −2.
You do not have to open Rounding Tool to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.