Long division with decimals

Divide any whole numbers up to 30 digits and see the written long division layout, every divide, multiply, subtract and bring-down step, the remainder or a decimal with the repeating block marked.

When the numbers do not divide evenly you can carry on instead of stopping at a remainder: put a decimal point in the quotient and bring down zeros. This page opens in decimal mode with 10 places. 5 ÷ 8 ends after three digits as 0.625, because the remainder reaches 0. 1 ÷ 3 never ends, and the page marks the repeating digit as 0.(3). It works this out by remembering each remainder: as soon as one comes back, the digits between the two visits repeat. That is also how you turn a fraction into a decimal by hand, since 3/8 is 3 ÷ 8. Choose how many places to work out, from 1 to 30, and read both the exact notation and the value rounded to that many places. One limit: the dividend and divisor must be whole numbers. To divide 7.5 by 0.25, multiply both by 100 first and enter 750 ÷ 25.

How it works

  1. Type the dividend and the divisor
  2. Choose remainder or decimal and read the answer
  3. Press Step through to follow each divide, multiply, subtract and bring-down

How long division works

Long division finds how many times the divisor fits into the dividend one digit at a time: divide, multiply, subtract, bring down the next digit, and repeat until no digits are left. Take 1006 ÷ 5. The first part of the dividend that is at least 5 is 10, and 5 goes into 10 two times, so write 2. Multiply 2 × 5 = 10 and subtract 10 − 10 = 0. Bring down the next digit, 0. Now 5 does not go into 0, so write 0 and bring down the 6. The number 6 holds one 5, so write 1; 6 − 5 leaves 1, and there are no digits left. The quotient is 201 and the remainder is 1, which you can check: 201 × 5 + 1 = 1006. The page draws this layout with the divisor on the left, the quotient on top and each subtraction under the dividend, and lists the same steps in words.

Zeros, small dividends and remainders

A zero in the quotient is easy to lose. When the divisor does not go into the number you have, write 0 in the quotient and bring down the next digit, as in the middle of 1006 ÷ 5. If the dividend is smaller than the divisor, such as 7 ÷ 12, the quotient is 0 and the remainder is the dividend, 7. A remainder is always smaller than the divisor. If it were larger, the divisor would fit one more time. Dividing 0 by any number gives 0. Dividing by 0 has no answer, so the page shows a message instead of a result. The checks the page applies are the same ones you can use by hand: quotient × divisor + remainder equals the dividend.

Decimals and repeating decimals

To keep going past the remainder, put a decimal point in the quotient and bring down zeros. 1 ÷ 4 stops at 0.25 because the remainder reaches 0. 1 ÷ 7 never stops: the remainders cycle through 3, 2, 6, 4, 5, 1 and back to 1, so the digits repeat as 0.(142857), a block of 6 digits. Because the remainder is always smaller than the divisor, the block can never be longer than divisor − 1 digits. The page finds the block by remembering each remainder; when one comes back, the digits between the two visits repeat. It shows the repeating part in brackets or under a line, for example 1 ÷ 6 = 0.1(6), and also a rounded value to the number of places you choose, such as 0.1429 for 1 ÷ 7 at 4 places. A fraction in lowest terms ends only if its denominator has no prime factors other than 2 and 5.

Limits of this page

The dividend and divisor must be whole numbers of at most 30 digits, with no signs, decimals or fractions. To divide decimals, multiply both numbers by the same power of 10 first, so that the divisor is whole, then enter them here. The page looks for a repeating block in up to 5,000 digits. With a very large divisor the block can be longer than that; the page then says so and gives the rounded value instead of guessing. The written layout shows up to 30 decimal places. Everything is worked out in your browser with exact integer arithmetic, so no digit is rounded on the way.

Frequently asked questions

How do I divide 5 by 8 as a decimal?

5 ÷ 8 = 0.625. Write 0 and a point, then 8 goes into 50 six times (48, leaving 2), into 20 two times (16, leaving 4) and into 40 five times, leaving 0.

How many digits can a repeating block have?

At most the divisor minus 1. Dividing by 7 gives a block of up to 6 digits, and 1 ÷ 7 uses all 6: 0.(142857). Dividing by 3 gives a block of 1 digit.

How do I divide a decimal such as 7.5 by 0.25?

Multiply both numbers by the same power of 10 until the divisor is whole: 7.5 ÷ 0.25 becomes 750 ÷ 25 = 30. Then enter 750 and 25 here.

What is 1006 divided by 5 with a remainder?

201 remainder 1. 5 goes into 10 two times, 5 does not go into the 0 so write 0, and 5 goes into 6 one time with 1 left over. Check: 201 × 5 + 1 = 1006.

How do I write a zero in the quotient?

When the divisor does not go into the number you are working with, write 0 in the quotient and bring down the next digit. In 1006 ÷ 5 this happens once, after the first subtraction, which is why the answer is 201 and not 21.

How do I know when a decimal repeats?

When a remainder you have already had comes back, the digits repeat from there. In 1 ÷ 7 the remainder 1 returns after 6 digits, so the answer is 0.(142857) with a block of 6 digits.

What if the dividend is smaller than the divisor?

The quotient is 0 and the remainder is the dividend. 7 ÷ 12 is 0 remainder 7. In decimal mode you continue with zeros: 7 ÷ 12 = 0.58(3).

How big can the numbers be?

Up to 30 digits each, calculated exactly with whole-number arithmetic. For example 987654321098765432109876543210 ÷ 123456789012345678901234567 gives the quotient 8000 and the remainder 9000000000900000007210.

Are my numbers stored or sent anywhere?

No. The numbers are worked out in your browser, not uploaded and not stored on your device. Reloading puts the example back. The page only counts that a result was shown, without your numbers.