How this calculator works
This calculator divides two whole numbers and shows the complete long-division process one step at a time, the same way it's worked out by hand on paper: bring down the next digit, figure out how many times the divisor fits, multiply, and subtract to get the new remainder before bringing down the next digit.
Alongside the step table, it reports the quotient (the whole-number part of the answer), the remainder (what's left over), and the exact decimal result — useful for checking homework or for cases like 10 ÷ 3, where the decimal repeats forever but the quotient and remainder are exact whole numbers.
The long-division algorithm
For each digit of the dividend, left to right: bring it down next to the current remainder to form a working value.Divide: find the largest whole number of times the divisor fits into the working value — that's the next quotient digit.Multiply that quotient digit by the divisor, then subtract the result from the working value to get the new remainder.Repeat until every digit has been brought down. dividend = divisor × quotient + remainder always holds.Negative numbers convention: the step-by-step table always works on the absolute values, since the classic algorithm is only ever taught on non-negative numbers. The final quotient's sign follows the usual rule (negative if exactly one of dividend or divisor is negative), and the remainder takes the sign of the dividend — the same convention JavaScript's % operator and most calculators use. For example, −17 ÷ 5 gives quotient −3 and remainder −2.
Worked example: 987 ÷ 6
- Bring down the first digit, 9. 9 ÷ 6 = 1 with remainder 3 (1 × 6 = 6, and 9 − 6 = 3).
- Bring down the next digit, 8, next to the remainder: 38. 38 ÷ 6 = 6 with remainder 2 (6 × 6 = 36, and 38 − 36 = 2).
- Bring down the last digit, 7, next to the remainder: 27. 27 ÷ 6 = 4 with remainder 3 (4 × 6 = 24, and 27 − 24 = 3).
- No digits are left, so the quotient is 164 with a final remainder of 3 — matching 6 × 164 + 3 = 987, and as a decimal, 987 ÷ 6 = 164.5.
Frequently asked questions
What's the difference between the remainder and the decimal result?
The remainder is the whole number left over after dividing as far as possible in whole numbers (987 ÷ 6 leaves remainder 3). The decimal result continues dividing into fractional place values instead of stopping (987 ÷ 6 = 164.5). Both describe the same leftover amount, just in different forms.
Why do you bring down one digit at a time instead of all at once?
Bringing down one digit at a time keeps each step's division within a manageable range (the working value is never more than 10 times the divisor plus 9), which is what makes long division doable by hand. Bringing down more digits at once is mathematically fine but harder to estimate the quotient digit for.
What happens when the first digit is smaller than the divisor?
The quotient digit for that step is 0 — for example, dividing 100 by 8, the first digit 1 gives 1 ÷ 8 = 0 remainder 1, so the process just brings down the next digit before the quotient starts producing nonzero digits. Leading zero quotient digits don't change the final answer.
How does long division work with negative numbers?
There's no single universal convention, so this calculator states its own: it divides the absolute values step by step, then applies the standard sign rule to the quotient (negative when dividend and divisor have opposite signs) and gives the remainder the same sign as the dividend, matching how most programming languages and calculators define remainder.
Does long division work for dividing by a multi-digit number?
Yes — the same bring-down, multiply, subtract process works for any divisor, including multi-digit ones. Each step just estimates the quotient digit against the full (possibly multi-digit) divisor instead of a single digit.