Decimal Calculator

Add, subtract, multiply, divide, raise to a power, take a root, or find a logarithm of decimal numbers — with exact answers and a step-by-step solution.

Pick an operation and enter two numbers. The exact answer and a step-by-step solution appear as you type.

Formula:a + b

How to Use This Calculator

  1. Choose an operation: +, −, ×, ÷, exponent (xʸ), root (ʸ√x), or logarithm (log).
  2. Enter the two numbers. The field labels change to match the operation — for example Base and Exponent for powers.
  3. Read the result. An = sign means the answer is exact; ≈ means it was rounded to 4 decimal places.
  4. Follow the step-by-step solution below the result to see how the answer was worked out.

Adding and Subtracting Decimals

Line up the decimal points first. If one number has fewer decimal places, pad it with zeros so both numbers have the same number of digits after the point. Then add or subtract as whole numbers and bring the decimal point straight down.

Example: 2.75 + 1.4

  2.75
+ 1.40
------
  4.15

Subtraction works the same way: 5.2 − 1.75 becomes 5.20 − 1.75 = 3.45.

Multiplying Decimals

You don’t need to line up the decimal points when multiplying.

  1. Multiply the numbers as if there were no decimal points.
  2. Count the decimal places in both factors together.
  3. Move the decimal point that many places to the left in the product.

Example: 2.5 × 0.37 → 25 × 37 = 925 → 1 + 2 = 3 decimal places → 0.925

Dividing Decimals

Division is easiest when the divisor is a whole number. Move the decimal point in the divisor to the right until it is one, then move the dividend’s decimal point the same number of places. Both numbers are multiplied by the same power of 10, so the quotient doesn’t change.

Example: 7.5 ÷ 0.25 → 750 ÷ 25 = 30

Some divisions never end. A quotient terminates only when the simplified denominator has no prime factors other than 2 and 5, so 1 ÷ 8 = 0.125 ends but 1 ÷ 3 = 0.3333… repeats. The calculator rounds repeating results to 4 decimal places and says so in the solution.

Exponents, Roots, and Logarithms with Decimals

Exponents. A whole-number exponent means repeated multiplication: 1.5² = 1.5 × 1.5 = 2.25. A negative exponent means the reciprocal: 0.5⁻² = 1 ÷ 0.5² = 4. A decimal exponent is computed through the natural logarithm: 1.4^2.3 = e^(2.3 × ln 1.4) ≈ 2.1682.

Roots. A root is a fractional power: the root of degree b of a equals a^(1/b). So √2.25 = 2.25^(1/2) = 1.5. Odd roots of negative numbers are real (∛−0.008 = −0.2), but even roots of negative numbers are not.

Logarithms. To find a logarithm with any base, use the change-of-base formula:

log_b(a) = ln a ÷ ln b

Example: log₂.₂(13.8) = ln 13.8 ÷ ln 2.2 ≈ 2.624669 ÷ 0.788457 ≈ 3.3289

When the answer is a whole number, such as log₂ 8 = 3, the calculator checks it exactly and shows it with an = sign.

Why 0.1 + 0.2 Isn’t Always 0.3 on a Computer

Most calculators and programming languages store numbers in binary floating point. Many everyday decimals, including 0.1 and 0.2, have no exact binary form, so they are stored as very close approximations. Adding them gives 0.30000000000000004 instead of 0.3.

This calculator keeps addition, subtraction, multiplication, whole-number powers, and terminating divisions exact by working with the decimal digits you typed, just as you would on paper. Only results that genuinely can’t be written as a finite decimal are rounded.

Sources

Frequently Asked Questions

How do you add decimals?

Write the numbers so their decimal points line up, padding the shorter one with zeros so both have the same number of decimal places. Then add as if they were whole numbers and keep the decimal point in the same column. For example, 2.75 + 1.4 becomes 2.75 + 1.40 = 4.15.

How do you multiply decimals?

Ignore the decimal points and multiply the numbers as whole numbers. Then count the decimal places in both factors together and move the decimal point that many places left in the product. For 2.5 × 0.37: 25 × 37 = 925, there are 1 + 2 = 3 decimal places, so the answer is 0.925.

How do you divide by a decimal?

Move the decimal point in the divisor to the right until it becomes a whole number, and move the decimal point in the dividend the same number of places. The answer doesn't change because both numbers were multiplied by the same power of 10. For 7.5 ÷ 0.25, move both points two places: 750 ÷ 25 = 30.

How do you divide a decimal by a whole number?

Divide as usual and place the decimal point in the answer directly above the decimal point in the dividend. For 8.4 ÷ 4, 84 ÷ 4 = 21, so the answer is 2.1.

Why does 1 ÷ 3 never end?

A fraction has a terminating decimal only when its denominator, after simplifying, has no prime factors other than 2 and 5 — the factors of 10. Three is not a factor of any power of 10, so 1 ÷ 3 = 0.3333… repeats forever. This calculator rounds such results to 4 decimal places.

Why do some calculators say 0.1 + 0.2 = 0.30000000000000004?

Most software stores numbers in binary floating point, and 0.1 and 0.2 have no exact binary form, so a tiny rounding error appears. This calculator works with the decimal digits you type, so 0.1 + 0.2 is exactly 0.3.