Decimal Calculator

Add, subtract, multiply, or divide two decimal numbers to get an exact sum, difference, product, or quotient — with no floating-point rounding error — plus the result as a simplified fraction.

Quick Facts

Add & subtract
Line up the decimal points
Pad the shorter number with trailing zeros so both numbers share the same decimal places, then add or subtract like whole numbers.
Multiply
Multiply, then place the point
Multiply the digits as whole numbers, then count the total decimal places in both factors and place the point that many digits from the right.
Divide
Shift both decimal points
Move the divisor's decimal point to make it a whole number, shift the dividend's point the same amount, then divide.
Precision
Exact, not floating-point
This tool uses integer (BigInt) scaling internally, so results like 0.1 + 0.2 come out as exactly 0.3.

Your Results

Calculated
Result
-
Exact answer
Expression
-
Full calculation
Decimal Places
-
Digits after the decimal point
As a Fraction
-
Result in lowest terms

Ready

Enter two decimal numbers, choose an operation, and press Calculate.

Formula and Method for Decimal Arithmetic

A decimal number uses place value to the right of a decimal point — tenths, hundredths, thousandths, and so on. Adding, subtracting, multiplying, and dividing decimals uses the same digit-by-digit arithmetic as whole numbers; the only extra step is tracking where the decimal point belongs. This calculator performs that arithmetic exactly, using integer (BigInt) math internally so results are never distorted by binary floating-point rounding — the classic 0.1 + 0.2 = 0.30000000000000004 problem that affects many ordinary calculators and programming languages.

How the calculation works

Addition and subtraction: both numbers are rewritten with the same number of decimal places (padding the shorter one with trailing zeros) so the digits line up by place value, then added or subtracted like whole numbers, with the decimal point reinserted in the same column. Multiplication: the two numbers are multiplied as whole-number digit strings, ignoring the decimal points; the point is then inserted into the product so the result has exactly as many decimal places as both factors combined — for example, a number with 2 decimal places times a number with 1 decimal place produces a result with 3 decimal places. Division: the divisor's decimal point is shifted right until it becomes a whole number, and the dividend's point is shifted the same number of places; the calculator then performs long division on the resulting whole numbers. If the division does not terminate (like 1 ÷ 3), the decimal is shown rounded to 15 places with an ellipsis, and the exact value is also given as a simplified fraction.

Common mistakes

  • Misaligning decimal points when adding or subtracting by hand — always pad with trailing zeros so both numbers have the same number of decimal places before combining them.
  • Forgetting to add decimal places when multiplying — the product's decimal places equal the sum of the decimal places in both factors, not just the larger of the two.
  • Trusting raw floating-point arithmetic in a spreadsheet or programming language for money or precise measurements — binary floating point cannot represent most decimal fractions exactly, which is why this calculator uses exact integer scaling instead.

Real-world applications

  • Balancing invoices, receipts, and currency totals where every cent must reconcile exactly.
  • Recording scientific or engineering measurements to a fixed number of decimal places (e.g., 3.140 cm vs. 3.14 cm).
  • Checking manual long-division or long-multiplication homework step by step.
  • Converting a division result into an exact fraction for further algebraic work.

Frequently Asked Questions

Why doesn't 0.1 + 0.2 equal exactly 0.3 on most calculators?
Computers store decimal numbers in binary floating point, and most decimal fractions (like 0.1 and 0.2) cannot be represented exactly in binary — the tiny rounding error shows up as 0.30000000000000004. This calculator avoids that by scaling digits into whole numbers with exact integer (BigInt) math, so 0.1 + 0.2 returns exactly 0.3.
How many decimal places does a multiplication result have?
The number of decimal places in the product equals the sum of the decimal places in the two factors. For example, 1.25 (2 decimal places) × 0.4 (1 decimal place) = 0.500, which has 3 decimal places, often shown as 0.5 once trailing zeros are dropped.
What happens when a decimal division doesn't terminate?
Some divisions, like 1 ÷ 3 = 0.333…, never end. This calculator shows the decimal rounded to 15 places with an ellipsis (…) to mark that it repeats, and also gives the mathematically exact answer as a simplified fraction (for example, 1/3).
Can I subtract a larger number from a smaller one?
Yes — enter the numbers in either order. If the second number is larger, the Subtraction result is negative, and the calculator shows the correctly signed decimal and fraction.