Long division with decimals

Divide any two numbers and continue the working past the decimal point to any number of places. Detects when the decimal repeats and marks the period.

Long division (decimal) inputs

Quotient (decimal)
3.142857
Repeats?
Yes — period 6
Decimals shown
10

How decimal long division works

  1. Do regular long division on the integer part. When the dividend runs out and there is a remainder, place a decimal point in the quotient and carry the dividend remainder.
  2. Append a 0 to the remainder ("bring down a zero") and divide again — the quotient digit goes after the decimal point.
  3. Repeat. If a remainder ever repeats, the decimal repeats with the same period.
If rk = rj for some j < k, the quotient digits between j and k repeat forever.

FAQ

How is the repetition detected?

After each step the calculator records the remainder. If the same remainder shows up twice, every quotient digit produced between those two points becomes the repeating block (the period).

What if my numbers themselves have decimals?

Move the decimal point in both numbers the same number of places to the right until both are integers, then divide as usual. The calculator does this for you.

Why doesn't 22/7 equal pi exactly?

22/7 ≈ 3.142857142857… is a rational approximation; pi is irrational and never repeats. They agree to about 3 decimal places only.

Related calculators