Arithmetic & Numbers

Rounding Calculator

Rounding replaces a number with a nearby, simpler one at a chosen place.

Try

Or paste a list of up to 100 numbers, one per line or separated by spaces. Commas separate numbers too, unless they group thousands (12,345).

Result

3.14159 rounded to the nearest hundredth (2 decimal places): 3.14

3.14159 rounded to the nearest hundredth (2 decimal places)

3.14

Round half up.

Kept digits | dropped digitsThe last kept digit is in the hundredths place.
3.14 | 159
The two nearest candidatesThe rule picks one of these. The nearer one is 3.14.
3.14 and 3.15
Rounding error (rounded − original)0.0506% of the original value
−0.00159

The first dropped digit is 1, which is less than 5, so the hundredths digit stays the same: 3.14.

3.14159 lies between 3.14 and 3.15 and rounds to 3.14 (filled end)
3.1383.143.1423.1443.1463.1483.153.1523.14159
3.14159 rounded to the nearest hundredth (2 decimal places) under every rule
RuleResultError
Round half up (selected)3.14−0.00159
Round half to even3.14−0.00159
Round half down3.14−0.00159
Round up (ceiling)3.15+0.00841
Round down (floor)3.14−0.00159
Round away from zero3.15+0.00841
Truncate (toward zero)3.14−0.00159
Step-by-step working (3 steps)
  1. Find the hundredths digit

    Split the number just after it: 3.14 | 159.

  2. Decide which way to round

    The first dropped digit is 1, which is less than 5, so the hundredths digit stays the same: 3.14.

  3. Write the rounded number

    Keep 2 decimal places and drop the rest: 3.14.

To round 3.14159 to the nearest hundredth, look at the next digit, 1: it is less than 5, so 3.14159≈3.143.14159 \approx 3.14. This rounding calculator rounds to any decimal place, place value, significant figure, fraction or multiple, under seven rules including half to even, and shows each step.

By Hira Noor, mathematicianLast reviewed Free, no sign-up, runs in your browserReport a problem

How to use this calculator

  1. Type the number to round, such as 3.14159. To round many at once, paste a list with one number per line.
  2. Choose what to round to: a whole number, the nearest tenth or hundredth, any number of decimal places, tens to billions, significant figures, a fraction such as 1/8, or a multiple such as 5 or 0.05.
  3. Pick the rounding rule. Round half up is the rule taught in school; banker's rounding, ceiling, floor and truncation are there for finance, code and measurement.
  4. Read the answer, then the steps: where the number is cut, which digit decides, and the rounding error. The table compares all seven rules for your number.
  5. Use Copy or Share to keep the result; a shared link opens with your number and settings in place.

Formulas

Rounding to a step (round half up)

round(x)=sgn(x)s⌊|x|s+12⌋\operatorname{round}(x) = \operatorname{sgn}(x)\, s \left\lfloor \frac{|x|}{s} + \frac{1}{2} \right\rfloor

Plain-text formula: round(x) = sgn(x) s⌊(|x|)/s + 1/2⌋

x
the number to round
s
the step: a power of ten, a fraction such as 1/8, or any multiple
\lfloor\ \rfloor
the floor: the largest whole number not above the value

Divide by the step, add one half, drop the fraction, then multiply back. The step is s=0.01s = 0.01 for hundredths, s=1000s = 1000 for thousands, s=0.125s = 0.125 for eighths. Working on |x||x| and putting the sign back makes −2.5-2.5 round to −3-3, the same as 2.52.5 rounds to 33.

Rounding up and down (ceiling and floor)

ceil(x)=s⌈xs⌉,floor(x)=s⌊xs⌋\operatorname{ceil}(x) = s \left\lceil \frac{x}{s} \right\rceil, \qquad \operatorname{floor}(x) = s \left\lfloor \frac{x}{s} \right\rfloor

Plain-text formula: ceil(x) = s⌈x/s⌉, floor(x) = s⌊x/s⌋

Ceiling always goes to the next multiple up and floor to the next multiple down, however close the number is. ⌈2.01⌉=3\lceil 2.01 \rceil = 3 and ⌊2.99⌋=2\lfloor 2.99 \rfloor = 2. For negatives, up means toward +∞+\infty: ⌈−2.5⌉=−2\lceil -2.5 \rceil = -2.

The step for n significant figures

s=10⌊log10|x|⌋−n+1s = 10^{\lfloor \log_{10} |x| \rfloor - n + 1}

Plain-text formula: s = 10^(⌊log_10|x|⌋ − n + 1)

The first significant digit of xx sits in the 10⌊log10|x|⌋10^{\lfloor \log_{10}|x| \rfloor} place, so keeping nn digits means rounding to the place n−1n - 1 further right. For 0.00456780.0045678 and 3 figures, ⌊log10⁡0.0045678⌋=−3\lfloor \log_{10} 0.0045678 \rfloor = -3, so s=10−5s = 10^{-5} and the answer is 0.004570.00457.

Rounding error

e=round(x)−x,|e|≤s2e = \operatorname{round}(x) - x, \qquad |e| \le \frac{s}{2}

Plain-text formula: e = round(x) − x, |e| ≤ s/2

Any of the "half" rules keeps the error within half a step: rounding to the nearest hundredth is never off by more than 0.005. Ceiling, floor and truncation can be off by almost a whole step.

Reading the result

The answer is an approximation. 3.143.14 stands for any value from 3.1353.135 up to 3.1453.145, so keep the full number for further working and round once, at the end. The rounding error line shows how far the answer is from the number you typed.

Keep trailing zeros in a rounded decimal. 2.502.50 to two decimal places says the value is known to the hundredth; writing 2.52.5 hides that. Zeros before the decimal point in a whole-number answer, such as the zeros in 46,00046{,}000, hold the place value and must stay.

If the result table shows the same answer for every "half" rule, the number was not a tie and the rule did not matter. The rules only disagree on exact halves, such as 2.52.5, and on negative numbers under ceiling and floor.

How to round a number

1. Find the rounding digit, the digit in the place you are rounding to. To round 4,786 to the nearest hundred, it is the 7.

2. Look at the digit to its right. If it is 5 or more, add 1 to the rounding digit. If it is 4 or less, leave the rounding digit as it is. Here the next digit is 8, so 7 becomes 8.

3. Drop the digits to the right. After the decimal point, remove them. Before the decimal point, replace them with zeros so the place value stays: 4,786≈4,8004{,}786 \approx 4{,}800.

Only the first dropped digit matters. 2.4999 to the nearest whole number is 2, because the 4 after the decimal point is below 5; the 9s after it do not push it up.

Place value chart: 45,678.2961 rounded to each place
Round to the nearestPlace valueRounding digitNext digitResultCheck
Ten thousand10,0004550,000open
Thousand1,0005646,000open
Hundred1006745,700open
Ten107845,680open
Whole number (one)18245,678open
Tenth0.12945,678.3open
Hundredth0.019645,678.30open
Thousandth0.0016145,678.296open

Rounding to the nearest tenth, hundredth and whole number

The tenths digit is the first after the decimal point, the hundredths digit the second and the thousandths the third. Rounding to the nearest tenth is the same as rounding to 1 decimal place, and the nearest hundredth is 2 decimal places, the usual precision for money.

A carry can run left through several digits. 9.96 to the nearest tenth: the 6 pushes the 9 tenths up to 10 tenths, which carries into the ones, giving 10.0. Keep the zero after the decimal point, because the answer is still exact to a tenth.

Worked examples to the nearest whole number, tenth and hundredth
NumberRound toDeciding digitResultCheck
7.5Whole number58open
2.47Tenth72.5open
2.47Whole number42open
3.14159Hundredth13.14open
0.666… (2/3)Hundredth60.67open
9.96Tenth610.0open
−4.65Tenth5−4.7open
1.005Hundredth51.01open

Rounding rules compared: half up, half to even, ceiling, floor and truncate

Every "round to nearest" rule gives the same answer unless the dropped part is exactly half. Then round half up goes away from zero (2.5 → 3, −2.5 → −3), round half down goes toward zero (2.5 → 2), and round half to even picks the even neighbour (2.5 → 2, 3.5 → 4).

The directed rules ignore how close the number is. Ceiling always goes up toward +∞+\infty and floor always goes down toward −∞-\infty, so for negatives ceiling moves toward zero. Away from zero and truncate treat both signs alike: truncating 2.7 or −2.7 just drops the .7.

Values rounded to a whole number under each rule
ValueRound half upRound half to evenRound half downRound up (ceiling)Round down (floor)Round away from zeroTruncate (toward zero)
2.53223232
3.54434343
2.42223232
2.63333232
−2.5−3−2−2−2−3−3−2
−2.6−3−3−3−2−3−3−2

Why 5 rounds up, and when to use banker's rounding

A dropped 5 with nothing after it is exactly halfway, so neither neighbour is nearer. The school rule picks up because it is simple and because, in practice, a 5 is usually followed by more non-zero digits, which really are above half. It has a small cost: across many exact ties, always rounding up pushes totals upward.

Round half to even, also called banker's rounding, sends half the ties up and half down, so the bias cancels. It is the default rounding of IEEE 754 floating point, of Python's round() and of many accounting and statistics systems. In 2.5 + 3.5 + 4.5 + 5.5 = 16, round half up gives 3 + 4 + 5 + 6 = 18; half to even gives 2 + 4 + 4 + 6 = 16.

Significant figures vs decimal places

Decimal places count digits after the decimal point. Significant figures count from the first non-zero digit, wherever the point is. 0.0045678 to 3 decimal places is 0.005, but to 3 significant figures it is 0.00457.

Use decimal places when values share units and size, such as money. Use significant figures when sizes vary widely, such as lab measurements. The sig fig calculator counts significant figures digit by digit and applies the rules for adding and multiplying measured values.

The same numbers rounded both ways
Number3 decimal places3 significant figures
0.00456780.0050.00457
3.141593.1423.14
45,678.29645,678.29645,700
0.10.1000.100

Estimating with rounding: multiplication and division

To estimate a product, round each factor to one significant figure, so each has a single non-zero digit, then multiply. 48×31≈50×30=1,50048 \times 31 \approx 50 \times 30 = 1{,}500, close to the exact 1,4881{,}488. The estimate tells you the size of the answer, so a calculator result of 14,880 or 148.8 is clearly a slip.

For division, round to numbers that divide easily: 612÷29≈600÷30=20612 \div 29 \approx 600 \div 30 = 20 (exact: about 21.1). Rounding one factor up and the other down, as in 48×3148 \times 31, makes the errors partly cancel. To round many factors at once, paste them as a list and choose 1 significant figure.

Estimates by rounding each number to 1 significant figure
ProblemRoundedEstimateExact
48 × 3150 × 301,5001,488
682 × 19700 × 2014,00012,958
4.8 × 7.25 × 73534.56
612 ÷ 29600 ÷ 302021.10 (to 2 decimal places)
3,875 + 2,1404,000 + 2,0006,0006,015

Rounding to a multiple: nearest 5, 25, 0.05 or 1/8

To round to any multiple, divide by it, round to a whole number, and multiply back. 37 to the nearest 5: 37÷5=7.437 \div 5 = 7.4, which rounds to 7, and 7×5=357 \times 5 = 35. The same steps round prices to 0.05 for cash, lengths to 1/16 inch for a tape measure, or minutes to the quarter hour.

Ceiling and floor to a multiple answer packing questions: 130 people at tables of 8 need the ceiling of 130÷8=16.25130 \div 8 = 16.25, which is 17 tables.

Rounding to multiples and fractions
TaskWorkingResultCheck
37 to the nearest 537 ÷ 5 = 7.4 → 735open
1,140 to the nearest 251,140 ÷ 25 = 45.6 → 461,150open
4.37 to the nearest 0.05 (cash)4.37 ÷ 0.05 = 87.4 → 874.35open
2.69 in to the nearest 1/8 in2.69 × 8 = 21.52 → 222.75 = 2 3/4open
1.38 h to the nearest quarter hour1.38 ÷ 0.25 = 5.52 → 61.50 hopen
130 people, tables of 8 (ceiling)130 ÷ 8 = 16.25 → 17136 seats, 17 tablesopen

Rounding in Excel, Google Sheets, Python and JavaScript

Spreadsheet and programming functions do not all use the same rule, which is why the same number can round differently in two programs. Excel and Google Sheets ROUND go away from zero on a tie. Python's round() uses half to even. JavaScript's Math.round sends ties toward +∞+\infty, so it gives −2 for −2.5.

Software also stores most decimals in binary, so 1.005 is held as 1.00499999…, and Python's round(1.005, 2) and JavaScript's (1.005).toFixed(2) both give 1.00. This calculator works with the exact decimal you type. The article on floating point numbers explains why.

Common rounding functions and the rule each uses
FunctionRule2.5 gives−2.5 gives
Excel / Google Sheets ROUND(x, 0)Half away from zero3−3
Excel ROUNDUP(x, 0)Away from zero3−3
Excel ROUNDDOWN(x, 0) or TRUNC(x)Toward zero2−2
Excel CEILING.MATH(x)Ceiling (toward +∞)3−2
Excel FLOOR.MATH(x)Floor (toward −∞)2−3
Python round(x)Half to even2−2
Python math.ceil(x) / math.floor(x)Ceiling / floor3 / 2−2 / −3
JavaScript Math.round(x)Half toward +∞3−2
JavaScript Math.trunc(x)Toward zero2−2

Rounding a list: why the rounded parts may not add up

Rounding each number on its own adds a small error to each, and the errors can pile up. Three shares of 100 are 33.33 each to the hundredth, which add to 99.99, not 100. Percentages in a chart that "add to 101%" have the same cause.

Paste a list into the calculator to see each rounded value, both totals and the total rounding error. When the parts must match a total, round all but one and give the last part the remainder, or round the total once.

Common rounding mistakes

Each row shows a slip and the correct working.

Common mistakes and the correct working
MistakeWrongRight
Rounding in stages (double rounding)2.449 → 2.45 → 2.52.449 to the nearest tenth is 2.4: only the first dropped digit, 4, counts
Dropping place-holding zeros3,467 to the nearest hundred = 353,500: the zeros keep the place value
Dropping a trailing zero2.497 to 2 decimal places = 2.52.50: two decimal places means two digits after the point
Rounding a negative the wrong way−3.7 to a whole number = −3−4: −3.7 is nearer −4
Looking at the wrong digit0.0453 to 2 significant figures = 0.050.045: count from the first non-zero digit, 4

Practice: round these yourself

Work each one out, then open the calculator to check the answer and the steps.

Practice questions with answers
QuestionAnswerCheck
Round 6.849 to the nearest tenth6.8open
Round 1,250 to the nearest hundred1,300open
Round 0.0396 to 2 decimal places0.04open
Round 3,499,999 to the nearest million3,000,000open
Round 8.5 with banker's rounding8open
Round 98,765 to 2 significant figures99,000open
Round −2.35 to the nearest tenth (half up)−2.4open

Worked example

Rounding a price to the nearest cent

A bill of 47.00 is split three ways, so each person owes 47 ÷ 3 = 15.666… Round each share to the nearest cent (hundredth).

  1. Find the hundredths digit: 15.66|666…, the second digit after the decimal point is 6.
  2. Look at the next digit: it is 6, which is 5 or more, so the hundredths digit goes up from 6 to 7.
  3. Drop the rest: each share is 15.67.
  4. Check the total: 3×15.67=47.013 \times 15.67 = 47.01, one cent over, because each share was rounded up by about a third of a cent. Charge two people 15.67 and one person 15.66 to collect exactly 47.00.

Answer: Each share rounds to 15.67, and the three rounded shares total 47.01.

Frequently asked questions

How do you round a number?

Find the digit in the place you are rounding to, then look at the digit to its right. If that digit is 5 or more, add 1 to the rounding digit; if it is 4 or less, leave it. Then drop the digits to the right, or replace them with zeros before the decimal point. 4,786 to the nearest hundred is 4,800.

Is 7.5 rounded up or down?

Up, to 8, under the usual round half up rule, because the dropped digit is 5. With round half to even (banker's rounding) 7.5 also goes to 8, because 8 is even, but 6.5 would go down to 6.

What does 2.47 round to?

2.47 rounds to 2.5 to the nearest tenth, because the next digit, 7, is 5 or more. To the nearest whole number it rounds to 2, because the digit after the decimal point, 4, is less than 5.

What happens if the digit is exactly 5?

A 5 with nothing after it is an exact tie. The school rule rounds it up (away from zero), so 2.5 becomes 3 and −2.5 becomes −3. Round half to even sends it to the even neighbour, so 2.5 becomes 2 and 3.5 becomes 4. If any non-zero digit follows the 5, as in 2.51, it is more than half and always rounds up.

What is the difference between rounding up and the ceiling?

For positive numbers they are the same: 2.1 rounded up is 3, and the ceiling of 2.1 is 3. For negatives, ceiling goes toward positive infinity (−2.1 → −2), while Excel's ROUNDUP goes away from zero (−2.1 → −3). This calculator offers both, as Round up (ceiling) and Round away from zero.

What is banker's rounding?

Banker's rounding, or round half to even, rounds an exact tie to the neighbour with an even last digit: 2.5 → 2, 3.5 → 4, 0.125 → 0.12 to two places. Over many values the ties go up and down equally, so totals are not pushed upward. Python's round() and IEEE 754 floating point use it.

What is the difference between significant figures and decimal places?

Decimal places count digits after the decimal point; significant figures count from the first non-zero digit. 0.0045678 is 0.005 to 3 decimal places but 0.00457 to 3 significant figures.

Why does 1.005 round to 1.00 in Python or JavaScript?

Computers store 1.005 in binary as about 1.00499999999999989, which is just below the tie, so it rounds down. Exact decimal arithmetic, which this calculator uses, gives 1.01. JavaScript's (1.005).toFixed(2) and Python's round(1.005, 2) both give 1.00 for this reason.

Sig Fig Calculator

Count and round sig figs, or add, subtract, multiply and divide with the sig fig rules.

Arithmetic & Numbers

Scientific Notation Calculator

Convert to scientific, E and engineering notation, or add, subtract, multiply and divide, with steps.

Arithmetic & Numbers

Decimal to Fraction Calculator

Decimals and repeating decimals to fractions in lowest terms, and fractions back to decimals, with steps.

Arithmetic & Numbers

Fraction Calculator

Add, subtract, multiply, divide and simplify fractions and mixed numbers, with every step shown.

Arithmetic & Numbers

Percentage Calculator

Percent of a number, what percent, reverse percentages, change, increase, decrease and difference, with steps.

Arithmetic & Numbers

Sources and further reading

  1. Introduction to Whole Numbers: Round Whole Numbers (Section 1.1, Prealgebra 2e) (opens in a new tab), OpenStax, Rice University
  2. Decimals: Round Decimals (Section 5.1, Prealgebra 2e) (opens in a new tab), OpenStax, Rice University
  3. Number and Operations in Base Ten, Grade 5 (5.NBT.A.4) (opens in a new tab), Common Core State Standards Initiative
  4. ROUND function (opens in a new tab), Microsoft Support
  5. Built-in Functions: round() (opens in a new tab), Python Software Foundation
  6. Math.round() (opens in a new tab), MDN Web Docs, Mozilla

Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?