Decimal Calculator
Add, subtract, multiply and divide decimals exactly, with no floating-point rounding errors.
Result
0.3
- Rounded to the chosen places
- 0.3
- Equation
- 0.1 + 0.2 = 0.3
0.1 + 0.2 = 0.3.
Calculation breakdown
| Step | Formula | Result |
|---|---|---|
| Decimal places used | The longer of 1 and 1 decimal places | 1 |
How it works
Type two decimals and choose the operation.
Worked example
0.1 + 0.2:
- As whole numbers, scaled by 10: 1 + 2 = 3
- Place the point back: 0.3, exactly
- A binary floating-point calculator would show 0.30000000000000004
Sources
Frequently asked questions
Why does 0.1 + 0.2 not equal 0.3 on some calculators?
Computers store most decimals in binary floating point, which cannot hold 0.1 or 0.2 exactly, so 0.1 + 0.2 comes out as 0.30000000000000004. This calculator works with whole numbers scaled by powers of ten, so the answer is exactly 0.3.
How do you add or subtract decimals?
Line up the decimal points, add or subtract the digits as whole numbers, and keep the decimal point in the same place. 1.5 − 2.75 = −1.25.
How do you multiply decimals?
Multiply as if they were whole numbers, then place the decimal point so the answer has as many decimal places as the two numbers together. 1.1 × 1.1 = 1.21.
How do you divide decimals?
Move the decimal point in both numbers the same number of places until the divisor is a whole number, then divide. 0.3 ÷ 0.06 is the same as 30 ÷ 6 = 5.
What if a division never ends?
Some divisions, like 1 ÷ 3, repeat forever. The calculator rounds to the number of decimal places you choose, half away from zero, and tells you the result was rounded.