What is the Long Division Calculator with Decimals?
This tool divides a dividend by a divisor and gives you the quotient to a chosen number of decimal places. Both numbers may be positive, negative, whole, or decimal. Importantly, the answer is truncated (cut off) at the requested decimal place rather than rounded, so you see exactly the digits long division would produce up to that point.
How to use it
Enter the Divisor (the number you divide by) and the Dividend (the number being divided). Pick how many decimal places to calculate to — for example 3. The calculator returns the quotient as a fixed decimal string with exactly that many digits after the point, keeping trailing zeros.
The formula
Let p be the chosen decimal places. The exact real quotient is \(q = \text{dividend} / \text{divisor}\). The result is computed as:
$$\text{Quotient} = \frac{\text{Dividend}}{\text{Divisor}} \quad \text{(truncated to } \text{N} \text{ decimal places)}$$sign = (dividend < 0) XOR (divisor < 0) ? -1 : +1; m = |dividend| / |divisor|; t = floor(m × 10^p) / 10^p; quotient = sign × t. Flooring the non-negative magnitude is the same as truncating toward zero. This calculator stops at p places — it does not round.
Worked example
Divide 31 by 16 to 3 places. \(31 / 16 = 1.9375\) exactly. \(\lfloor 1.9375 \times 1000 \rfloor = 1937\), so \(1937 / 1000 =\) 1.937. At 6 places it would show 1.937500.
How to Do Long Division with Decimals by Hand
The calculator follows the same steps you would use with pencil and paper. It stops after the number of decimal places you ask for and does not round the last digit.
- Set the sign first and use absolute values. Use the XOR rule: the quotient is negative when exactly one of the dividend or divisor is negative. It is positive when both have the same sign. After you note the sign, divide the absolute values \(|a|\) and \(|b|\).
- Make the divisor a whole number. If the divisor has a decimal point, move it to the right until the divisor is a whole number. Then move the dividend's decimal point the same number of places. This is the same as multiplying both numbers by the same power of 10, so the quotient does not change. For example, \(0.75 \div 1.5\) becomes \(7.5 \div 15\).
- Divide the whole-number part. Find how many times the divisor fits into the leading digits and write that quotient digit. Multiply it by the divisor, subtract the product, and bring down the next digit. Repeat until you have used every digit of the whole-number part.
- Cross the decimal point. When you reach the decimal point in the dividend, write a decimal point in the quotient. From then on, bring down zeros (or the remaining decimal digits of the dividend) one at a time.
- Repeat until you have \(p\) decimal digits, then stop. Once the quotient has \(p\) digits after the decimal point, stop. Do not look at the next digit to decide on rounding. The result equals $$\text{Quotient} = \pm\frac{\lfloor |a/b| \times 10^p \rfloor}{10^p}$$ with the sign from step 1 applied at the end.
Example: 31 ÷ 16 to 3 decimal places
| Step | Working amount | Division | Quotient digit | Subtract | Remainder |
|---|---|---|---|---|---|
| Whole part | 31 | \(31 \div 16\) | 1 | \(31 - 16 = 15\) | 15 |
| Decimal point | Write "." in the quotient and bring down a 0 | ||||
| 1st decimal | 150 | \(150 \div 16\) | 9 | \(150 - 144 = 6\) | 6 |
| 2nd decimal | 60 | \(60 \div 16\) | 3 | \(60 - 48 = 12\) | 12 |
| 3rd decimal | 120 | \(120 \div 16\) | 7 | \(120 - 112 = 8\) | 8 |
Reading the digits gives 1, then the decimal point, then 9, 3 and 7. To 3 decimal places, 31 ÷ 16 = 1.937. The remainder is still 8, so the exact value continues (\(31/16 = 1.9375\)). Because the result is truncated, the 4th digit is dropped and does not round the answer up to 1.938.
More Worked Examples
Every result below uses the truncation rule \(\lfloor |a/b| \times 10^p \rfloor / 10^p\). The division is done on absolute values, and the sign is applied at the end.
(a) A negative input: −7 ÷ 3 to 4 decimal places
- Sign: only the dividend is negative, so the quotient is negative. Work with \(7 \div 3\).
- Whole part: \(7 \div 3 = 2\) remainder \(7 - 6 = 1\).
- Write the decimal point and bring down a 0: \(10 \div 3 = 3\) remainder \(10 - 9 = 1\).
- The remainder 1 keeps coming back, so the next three digits are also 3. That gives 2.3333 after 4 decimal places.
- Truncate: \(\lfloor 2.3333\ldots \times 10^4 \rfloor / 10^4 = 23333 / 10^4 = 2.3333\). Then apply the sign.
Result: −7 ÷ 3 = -2.3333. Truncation moves toward zero. Applying a floor to the signed value would give \(\lfloor -23333.33\ldots \rfloor = -23334\), which is −2.3334. That is not what this calculator does.
(b) A decimal divisor: 0.75 ÷ 1.5 to 3 decimal places
- Sign: both numbers are positive, so the quotient is positive.
- Move the decimal point one place right in both numbers: \(0.75 \div 1.5 = 7.5 \div 15\).
- Whole part: \(7 \div 15 = 0\) remainder 7, so the quotient begins with 0.
- Write the decimal point and bring down the 5: \(75 \div 15 = 5\) remainder \(75 - 75 = 0\).
- Bring down zeros: \(0 \div 15 = 0\) twice. That gives 0.500.
Result: 0.75 ÷ 1.5 = 0.500. Check: \(0.5 \times 1.5 = 0.75\). The division ends exactly, so the trailing zeros are true digits and nothing is cut off.
(c) A repeating decimal: 2 ÷ 3 to 5 decimal places, truncated vs rounded
- Whole part: \(2 \div 3 = 0\) remainder 2.
- Write the decimal point and bring down a 0: \(20 \div 3 = 6\) remainder \(20 - 18 = 2\).
- The remainder 2 repeats forever, so every decimal digit is 6.
- Truncate after 5 digits: \(\lfloor 0.6666\ldots \times 10^5 \rfloor / 10^5 = 66666 / 10^5 = 0.66666\).
Result: 2 ÷ 3 = 0.66666 (truncated). Standard rounding would look at the 6th digit (6). Because it is 5 or more, rounding gives 0.66667. The two answers differ by \(0.00001\), one unit in the last place. A truncated quotient is never larger in magnitude than the exact value. A rounded quotient can be larger or smaller.
| Division | Places | Truncated (this calculator) | Rounded (for comparison) |
|---|---|---|---|
| −7 ÷ 3 | 4 | −2.3333 | −2.3333 |
| 0.75 ÷ 1.5 | 3 | 0.500 | 0.500 |
| 2 ÷ 3 | 5 | 0.66666 | 0.66667 |
| 31 ÷ 16 | 3 | 1.937 | 1.938 |
FAQ
Why does 22/15 give 1.466 and not 1.467? Because this tool truncates rather than rounds. \(22/15 = 1.46666...\), and cutting at 3 places leaves 1.466. To round, calculate to more places first.
What if the divisor is zero? Division by zero is undefined, so the calculator returns an error instead of a number.
Does it handle negative and decimal inputs? Yes. The sign follows the XOR rule, and decimal dividends or divisors (like \(0.75 / 1.5\)) are handled directly.