Decimal Calculator

Use this decimal calculator to add, subtract, multiply or divide two decimals with exact arithmetic, step-by-step working, repeating-decimal detection and optional rounding.

Decimal Calculator inputs

Exact keeps every digit; a repeating division is shown to 10 places. Pick a number to round the answer.

Result

Enter your values to see the result.

  • Formula v1.0, unit-tested
  • Examples generated by the calculator
  • Updated
  • How we calculate
On this page

Formula

a/10^m ± b/10^n = (a·10^(k−m) ± b·10^(k−n)) / 10^k, k = max(m, n); (a/10^m) × (b/10^n) = ab / 10^(m+n)

a, b
the two decimals written as whole numbers with the decimal point removed
m, n
the number of decimal places in each decimal
k
the common number of decimal places after lining up the points

What the decimal calculator does

This decimal calculator adds, subtracts, multiplies and divides two decimals and shows how the answer is reached, the same way you would work it out on paper. Each answer also appears as a simplified fraction, and a division that never ends is flagged with its repeating block.

The numbers are handled as exact decimals. Most software stores numbers in binary floating point, which can’t hold values such as 0.7 or 1.1 exactly, so a quick sum can come out as 0.7999999999999999 or 3.3000000000000003. Here every decimal is kept as a whole number plus a count of decimal places, so the result is exactly what pencil-and-paper arithmetic gives.

How to use it

  1. Enter the first decimal, pick an operation and enter the second decimal. Negative numbers are fine.
  2. Leave Decimal places on Exact to see every digit, or choose 0 to 20 places to round the answer.
  3. Read the answer, the fraction form and the steps. For division you also see the repeating decimal and how long its repeating block is.

How to calculate decimals by hand

Adding and subtracting decimals: line up the points

To work out 6.08 + 14.9, give both numbers the same number of decimal places so the points line up:

  6.08
+14.90
------
 20.98

Then add as whole numbers (608 + 1,490 = 2,098) and put the point back two places from the right: 20.98. Subtraction works the same way. Filling the gap with a zero (14.90) is what stops digits landing in the wrong column.

Multiplying decimals: count the decimal places

For 3.6 × 0.07, ignore the points and multiply 36 × 7 = 252. The factors have 1 and 2 decimal places, 3 in total, so the product has 3 decimal places: 0.252. You don’t need to line up the points when multiplying.

Dividing decimals: make the divisor whole

For 4.56 ÷ 0.12, move the decimal point two places right in both numbers so the divisor is a whole number: 456 ÷ 12 = 38. Moving both points by the same amount multiplies both numbers by 100, which leaves the quotient unchanged.

Repeating decimals

Some divisions never finish. 5 ÷ 11 = 0.454545…, where “45” repeats forever, written 0.(45) on this page or with a bar over 45 in a textbook. A division terminates only when the simplified fraction’s denominator has no prime factors other than 2 and 5. For example, 3/8 = 0.375 ends, but 1/12 = 0.08333… repeats because 12 includes a factor of 3.

Common fractions as repeating decimals

Fraction Decimal Repeating block Rounded to 4 places
1/3 0.(3) 3 0.3333
2/3 0.(6) 6 0.6667
1/6 0.1(6) 6 0.1667
1/7 0.(142857) 142857 0.1429
1/9 0.(1) 1 0.1111
1/11 0.(09) 09 0.0909
1/12 0.08(3) 3 0.0833
5/11 0.(45) 45 0.4545

Rounding decimals

To round, look at the digit just after the last place you keep. If it is 5 or more, round up; otherwise leave the kept digits alone. 2/3 rounds to 1 at 0 places, 0.7 at 1 place and 0.67 at 2 places. This calculator rounds half away from zero, the method taught in US schools, so 4.125 rounds to 4.13 and −4.125 to −4.13. Some spreadsheets and programming languages use “round half to even” instead, which would give 4.12, so a small difference in the last digit is usually a rounding rule, not an error.

When you pick a number of places, the decimal calculator keeps trailing zeros, so a price shows as 3.50 rather than 3.5. On Exact it drops them.

Where exact decimals matter

  • Money. Prices, invoices and bank balances are decimals with two places. Exact arithmetic means a column of cents never drifts by a fraction of a cent. For long lists of amounts, the ten key calculator prints a running tape.
  • Measurements. Machinists, carpenters and lab technicians add and subtract lengths such as 12.375 in and 0.0625 in, where an extra digit matters.
  • Homework checks. Students can compare their working with the steps shown, especially the decimal point placement in multiplication and division.
  • Unit prices. Dividing a price by a weight often produces a repeating decimal; rounding to 2 or 3 places gives a usable price per ounce.

Common mistakes with decimals

  • Lining up the last digits instead of the points. 6.08 + 14.9 is not 7.57. Line up the decimal points, not the right-hand edges.
  • Lining up points when multiplying. In multiplication you count decimal places instead. 0.4 × 0.2 = 0.08, not 0.8.
  • Moving only one decimal point when dividing. Shift the divisor and the dividend by the same number of places.
  • Rounding too early. Rounding each step can shift the final digit. Keep the exact value and round once at the end.

Decimals, fractions and percents

Every terminating or repeating decimal is a fraction, and the calculator shows that fraction with each answer. To work in fractions from the start, use the fraction calculator, and to see long division laid out digit by digit, use the long division calculator. Percent questions are decimals multiplied by 100, which the percentage calculator answers directly. The guide to fractions, decimals and percentages shows how to move between all three forms.

  • Terminating decimal: a decimal that ends, such as 0.375.
  • Repeating decimal: a decimal with a block of digits that repeats forever, such as 0.(45).
  • Decimal places: the number of digits after the decimal point.

Worked examples

The classic 0.1 + 0.2 check

Binary floating point famously gives 0.30000000000000004. Exact decimal arithmetic gives 0.3.

Inputs: First decimal = 0.1; Operation = + Add; Second decimal = 0.2; Decimal places = Exact

Line up the decimal points by giving both numbers 1 decimal place: 0.1 + 0.2 Ignore the points and add the whole numbers: 1 + 2 = 3 Put the decimal point back 1 decimal place from the right: 0.3

Answer: 0.1 + 0.2 = 0.3

Subtracting decimals with different lengths

A 15.2 m roll of tape has 9.875 m used. How much is left?

Inputs: First decimal = 15.2; Operation = − Subtract; Second decimal = 9.875; Decimal places = Exact

Line up the decimal points by giving both numbers 3 decimal places: 15.200 − 9.875 Ignore the points and subtract the whole numbers: 15,200 − 9,875 = 5,325 Put the decimal point back 3 decimal places from the right: 5.325

Answer: 15.2 − 9.875 = 5.325

Multiplying two decimals

Multiply 2.45 by 0.36 and count the decimal places.

Inputs: First decimal = 2.45; Operation = × Multiply; Second decimal = 0.36; Decimal places = Exact

Multiply as if there were no decimal points: 245 × 36 = 8,820 Count the decimal places: 2 + 2 = 4 Put the decimal point 4 decimal places from the right: 0.8820

Answer: 2.45 × 0.36 = 0.882

A repeating division

Divide 7 by 0.3. The answer repeats forever, so it is shown to 10 decimal places.

Inputs: First decimal = 7; Operation = ÷ Divide; Second decimal = 0.3; Decimal places = Exact

Move the decimal point 1 decimal place to the right in both numbers so the divisor is whole: 7 ÷ 0.3 → 70 ÷ 3 Divide: 7 ÷ 0.3 = 23.(3) — the digits in parentheses repeat forever Round to 10 decimal places (half away from zero): 23.3333333333

Answer: 7 ÷ 0.3 = 23.(3) ≈ 23.3333333333 (10 decimal places)

Dividing and rounding to cents

Split $22.50 seven ways and round to 2 decimal places.

Inputs: First decimal = 22.5; Operation = ÷ Divide; Second decimal = 7; Decimal places = 2 decimal places

Divide: 22.5 ÷ 7 = 3.2(142857) — the digits in parentheses repeat forever Round to 2 decimal places (half away from zero): 3.21

Answer: 22.5 ÷ 7 = 3.2(142857) ≈ 3.21 (2 decimal places)

Assumptions and limitations

  • Each decimal can be between −1,000,000,000,000 and 1,000,000,000,000 with up to 15 significant digits. Numbers are stored as exact scaled whole numbers, not binary floating point.
  • Addition, subtraction and multiplication always give a terminating decimal, shown with every digit when Decimal places is set to Exact.
  • In Exact mode, a division that never ends is rounded to 10 decimal places; the repeating block is shown in parentheses (for example 0.1(6)) and the exact fraction is given.
  • Repeating blocks longer than 1,000 digits are reported as such rather than written out.
  • Rounding is half away from zero: 2.345 to 2 places is 2.35 and −2.345 is −2.35. When you choose a number of places, trailing zeros are kept (3.50).
  • Results are grouped with commas in the thousands, and the minus sign is shown as −.

Frequently asked questions

How do you calculate decimals by hand?

For addition and subtraction, line up the decimal points and work as with whole numbers. For multiplication, ignore the points, multiply, then count the total decimal places. For division, move the point in both numbers until the divisor is whole, then divide.

Why does a regular calculator sometimes show 0.7999999999999999?

Many programs store numbers in binary floating point, which can't represent most decimal fractions exactly, so 0.7 + 0.1 can come out as 0.7999999999999999. This decimal calculator stores numbers as exact scaled whole numbers, so it gives 0.8.

What do the parentheses in 0.1(6) mean?

The digits in parentheses repeat forever, so 0.1(6) is 0.16666… Textbooks often draw a bar over the repeating digits instead. A fraction gives a repeating decimal whenever its simplified denominator has a prime factor other than 2 or 5.

How do you convert a decimal to a fraction?

Write the digits over a power of 10 that matches the decimal places, then simplify: 0.375 = 375/1000 = 3/8. The calculator shows every answer as a simplified fraction, including repeating ones such as 2/3.

How do you convert a decimal to a percent?

Multiply by 100, which moves the decimal point two places right: 0.375 becomes 37.5%. The percentage calculator handles percent-of and percent-change questions.

How many decimal places should I round to?

Use 2 for money, 1 or 2 for most measurements, and match the least precise number you started with in science work. Choose the places in the menu, or leave it on Exact to see every digit.

Can this calculator convert decimal hours?

No. Decimal hours such as 7.75 hours (7 hours 45 minutes) are a time conversion. Use the time card calculator or the hours calculator for payroll and timesheet math.

Sources

  1. Prealgebra 2e, 5.2 Decimal Operations — OpenStax, Rice University. Checked October 10, 2026.
  2. Floating-Point Arithmetic: Issues and Limitations — Python Software Foundation. Checked October 10, 2026.

GCF Calculator

Greatest common factor of 2+ numbers, with prime factors and steps.

Math