The round() command


Command Summary

Truncates a number to a specified number of decimal places.

Command Syntax

round(value[,number of decimal places to round to])

Menu Location

  • Press 2nd MATH to enter the MATH popup menu.
  • Press 1 to enter the Number submenu.
  • Press 3 to select round(.

Calculator Compatibility

This command works on all calculators.

Token Size

1 byte

The round command takes whatever value you give it, and it rounds the value to a given number of decimal places. For instance round(9.7,0) will return 10, since rounding to 0 decimal places will return the closest whole number. Another example would be if you entered round(5.46338,3) which would return 5.463, since it rounded 5.46338 to 3 decimal places. The round function can round 0 to 12 decimal places, and if you enter a value outside that range, you will get a domain error. Strangely enough, if you enter an imaginary number into the round() command, nothing happens and the calculator returns the same function in a simplified form.

:         99.35847
:         round(4.392*i,2.)
:         round(2.348972,2*i)

Unexpected results

Your calculator may also round, say for instance if you do this:


If your calculator is set to float or to fix at 10 or less, the calculator will round the number that comes out of the function. The function above should return 2.4573485645, since that is less than 11 digits, but if your calculator is set to "Float 6" it will return 2.457349 instead of what you expected.

Error Conditions

260 - Domain error happens when the number of decimal points to round to is not in the range 0-12.

Related Commands

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License