Rounding
Function forms
Section titled “Function forms”round(1.5) | 2ceil(1.1) | 2floor(1.9) | 1round(-1.5) | -2Rounding to decimal places
Section titled “Rounding to decimal places”round(3.14159, 2) | 3.143.14159 to 2 dp | 3.143.14159 to 2 digits | 3.14Rounded
Section titled “Rounded”1.5 rounded | 21.4 rounded | 10.5 rounded | 1-1.5 rounded | -2Rounded up / down
Section titled “Rounded up / down”1.2 rounded up | 21.8 rounded down | 1Rounded to nearest multiple
Section titled “Rounded to nearest multiple”47 to nearest 5 | 4547 rounded to nearest 5 | 4523 to nearest 10 | 20Directional rounding to nearest multiple
Section titled “Directional rounding to nearest multiple”42 rounded up to nearest 5 | 4548 rounded down to nearest 5 | 45Rounded to nearest hundred, thousand, or million
Section titled “Rounded to nearest hundred, thousand, or million”1234 rounded to nearest hundred | 12001234 rounded to nearest thousand | 10001500000 rounded to nearest million | 2000000Units and currency preserved
Section titled “Units and currency preserved”round(5.6 kg) | 6 kground($19.99) | $205.7 m rounded | 6 mWorks on variables
Section titled “Works on variables”price = 19.99 | 19.99round(price) | 20