Long Division Calculator
Perform long division of positive integers and see every step of the algorithm: quotient, remainder, and how each digit is processed.
Positive whole number only (no decimals or negatives).
Positive whole number greater than zero.
Result
- Quotient (integer):
- —
- Remainder:
- —
- Decimal approximation:
- —
Interpretation: dividend = divisor × quotient + remainder.
Step-by-step long division
Each row shows how one digit of the dividend is processed: the current partial dividend, the quotient digit chosen, the product with the divisor, and the new remainder carried to the next step.
| Step | Partial dividend | Quotient digit | Product (digit × divisor) | Remainder | Explanation |
|---|---|---|---|---|---|
| Enter a dividend and divisor, then click “Calculate long division” to see all steps here. | |||||
What is long division?
Long division is the standard algorithm used to divide one integer (the dividend) by another (the divisor), producing a quotient and a remainder. It is written in a vertical layout and works digit by digit from left to right.
In symbolic form, if you divide an integer \(a\) by a positive integer \(b\), long division finds integers \(q\) (quotient) and \(r\) (remainder) such that
\(a = bq + r,\quad 0 \le r < b.\)
The condition \(0 \le r < b\) ensures that the remainder is always smaller than the divisor, which makes the representation unique.
How the long division algorithm works
The classic long division algorithm can be broken into a sequence of simple steps:
- Start with the leftmost digit(s) of the dividend until the number you have is at least as big as the divisor.
- Determine how many times the divisor fits into this partial dividend without exceeding it. This becomes the next quotient digit.
- Multiply the divisor by that quotient digit and subtract the result from the partial dividend.
- Bring down the next digit of the original dividend and repeat the process using the new partial dividend.
- Continue until all digits of the dividend have been processed. The final value left is the remainder.
The calculator implements exactly this logic and shows each iteration in the Step-by-step long division table.
Worked example: 154 ÷ 7
Let us go through the division of 154 by 7:
- Start with the first digit: 1. Since 7 does not fit into 1, the first quotient digit is 0 and we consider the first two digits.
- Now consider 15. The divisor 7 fits into 15 exactly 2 times (because \(2 \times 7 = 14\) and \(3 \times 7 = 21 > 15\)). So the next quotient digit is 2.
- Subtract \(14\) from \(15\) to get a remainder of \(1\).
- Bring down the final digit 4, forming the new partial dividend 14.
- 7 fits into 14 exactly 2 times (\(2 \times 7 = 14\)), so the next quotient digit is 2 and the new remainder is 0.
154 ÷ 7 = 22 with remainder 0.
The calculator reproduces these steps and confirms that \(154 = 7 \times 22 + 0\).
Interpreting quotient and remainder
The quotient tells you how many whole times the divisor fits into the dividend. The remainder tells you what is left over. For example:
- \(15 ÷ 4 = 3\) remainder 3 (since \(15 = 4 \times 3 + 3\)).
- \(100 ÷ 9 = 11\) remainder 1 (since \(100 = 9 \times 11 + 1\)).
You can turn a division with remainder into a mixed number or decimal:
\(15 ÷ 4 = 3 + \dfrac{3}{4} = 3.75\),
\(100 ÷ 9 = 11 + \dfrac{1}{9} \approx 11.111\ldots\)
Limitations and extensions
This tool focuses on positive integers, which is how long division is normally taught in school. The same ideas extend to:
- Negative numbers (track the sign separately, then divide absolute values).
- Decimal numbers (shift the decimal point to convert into integers first).
- Polynomials (the polynomial long division algorithm is analogous but uses powers of \(x\)).
FAQ – Long division calculator
Why does the calculator only accept whole numbers?
To keep the step-by-step output clear and close to the paper-and-pencil algorithm, this version restricts inputs to positive integers. For decimals, you can multiply both dividend and divisor by the same power of ten, perform integer long division, and then shift the decimal point back.
What happens if the divisor is larger than the dividend?
If the divisor is larger, the quotient is 0 and the remainder equals the dividend. For example, 5 ÷ 9 gives quotient 0 and remainder 5. The calculator will show this as the first step.
How accurate is the decimal approximation?
The decimal approximation is computed using standard floating-point arithmetic in JavaScript and shown to 6 decimal places. For typical school-level divisions, this is more than sufficient; any rounding errors are negligible.
How is this related to the Euclidean algorithm?
Long division is essentially the Euclidean algorithm written in base 10, one digit at a time. Both methods repeatedly divide and take remainders until the remainder is smaller than the divisor, which is why they are fundamental tools in number theory and algebra.