Skip to content
Math

Long Division Calculator

Enter any dividend and divisor (whole numbers, decimals, or negatives) and instantly see the whole-number quotient, remainder, simplified remainder fraction, mixed-number form, and the full decimal answer. The step-by-step panel shows every stage of the long-division algorithm so you can follow or check your work digit by digit.

Your details

The number you want to divide. Decimals and negatives are accepted.
The number to divide by. Cannot be zero. Decimals and negatives are accepted.
Controls how many decimal places are shown in the decimal result. Does not affect the quotient or remainder.
Rounded: the last shown digit is rounded. Truncated: digits are cut off without rounding, matching the traditional long-division stopping point.
Quotient (whole number)
31
Remainder3
Remainder as fraction3/4
Mixed number31 3/4
Decimal result31.75
Verification (Q x D + R)127
Quotient (whole groups)31
Remainder (leftover)3

The answer is 31 remainder 3.

  • As a mixed number the result is 31 3/4.
  • The remainder 3 expressed as a fraction of the divisor is 3/4.
  • As a decimal, the same division equals 31.75.
  • Multiply the quotient by the divisor and add the remainder to recover the original dividend.

Next stepUse the fraction form "3/4" to write the answer as a mixed number: 31 3/4.

Formula

dividend=quotient×divisor+remainder,0remainder<divisor\text{dividend} = \text{quotient}\times\text{divisor} + \text{remainder}, \quad 0 \le |\text{remainder}| < |\text{divisor}|

Worked example

127 ÷ 4: 4 goes into 12 three times (write 3, subtract 12, bring down 7); 4 goes into 7 once (write 1, subtract 4, leftover 3). Quotient = 31, remainder = 3, fraction = 3/4, mixed number = 31 3/4, decimal = 31.75. Check: 31 x 4 + 3 = 127.

How long division produces a quotient and remainder

Long division splits a dividend into equal groups the size of the divisor. The quotient counts how many whole groups fit, and the remainder is whatever is left when no further whole group can be formed. Mathematically, floor(dividend / divisor) gives the quotient and dividend minus (quotient times divisor) gives the remainder. The remainder is always a non-negative integer (for integer inputs) that is strictly less than the absolute value of the divisor. This relationship is expressed by the division algorithm: dividend equals quotient times divisor plus remainder.

Fraction and mixed-number forms

A remainder does not have to stay as a whole number. Dividing the remainder by the divisor produces a proper fraction that you can simplify by finding the greatest common divisor of the two numbers. Writing the whole-number quotient alongside that fraction gives the mixed-number form, which is often the most readable way to express the answer. For example, 127 divided by 4 gives the mixed number 31 3/4, because the remainder 3 over the divisor 4 simplifies to 3/4 (already in lowest terms). The decimal form 31.75 represents the same value written in base-10 positional notation.

Decimal precision and repeating decimals

When division does not terminate (for example, 1 divided by 3), the decimal continues infinitely with a repeating block. This calculator lets you choose 0 to 10 decimal places and choose whether to round or truncate the last shown digit. Rounding changes the final digit to the nearest value; truncation simply stops at that digit without any rounding adjustment, matching the traditional long-division stopping point where you write "approximately" before the result. For 22 divided by 15, the result truncated to 3 places is 1.466, while rounded to 3 places it is 1.467.

Negative dividends and divisors

When one input is negative and the other is positive, the result is negative. When both are negative the result is positive. The remainder follows the sign of the dividend in standard mathematical convention, meaning the identity dividend = quotient times divisor plus remainder always holds regardless of sign. The fraction and mixed-number outputs strip the sign from the remainder and apply it to the whole quotient, which is the conventional way to display a negative mixed number such as -31 3/4.

Checking your work with the verification identity

Every long division can be verified in one step: multiply the quotient by the divisor, then add the remainder. The result must equal the original dividend. This calculator shows that verification result so you can confirm the answer at a glance. If the verification does not match the dividend, either the quotient or the remainder (or both) are wrong. This check is the same one taught in elementary arithmetic and remains the fastest way to catch a calculation error.

Divisibility rules for common divisors

DivisorRuleExample
2Last digit is even (0, 2, 4, 6, 8) 128 is divisible by 2 (ends in 8)
3Sum of digits is divisible by 3 129: 1+2+9=12, divisible by 3
4Last two digits form a number divisible by 4 128: 28 / 4 = 7, yes
5Last digit is 0 or 5 135 ends in 5, divisible by 5
6Divisible by both 2 and 3 126: even, and 1+2+6=9 (divisible by 3)
8Last three digits divisible by 8 1,024: 024=24, 24/8=3, yes
9Sum of digits divisible by 9 729: 7+2+9=18, divisible by 9
10Last digit is 0 130 ends in 0

Quick tests to check whether a number divides evenly without doing the full division.

Frequently asked questions

What is the difference between the remainder and the decimal result?

The remainder is the whole-number amount left over after taking out as many full divisors as possible, so it is always smaller (in absolute value) than the divisor. The decimal result keeps dividing past the decimal point, expressing that leftover as a fractional part instead of an integer. Both representations are equivalent: a remainder of 3 when dividing by 4 is the same value as the decimal portion 0.75 of the answer.

How do I turn a remainder into a fraction or mixed number?

Write the remainder over the divisor to form a fraction, then simplify by dividing both numbers by their greatest common divisor. For 127 divided by 4 the remainder is 3, giving the fraction 3/4, already in lowest terms. Combine that with the whole-number quotient 31 to get the mixed number 31 3/4. This calculator performs both conversions automatically and shows the simplified fraction.

Why can't I divide by zero?

Division asks how many times the divisor fits into the dividend. Zero fits into any number an unlimited number of times, making the answer undefined. Mathematically, no finite quotient satisfies quotient times zero equals the dividend (unless the dividend is also zero, which is the indeterminate form 0/0). The calculator returns no result when the divisor is zero.

What is the difference between rounding and truncating the decimal?

Truncating stops the decimal at a chosen number of digits without adjusting the final digit. Rounding adjusts the final digit up if the next digit is 5 or greater. For 22 divided by 15, truncating to 3 decimal places gives 1.466 while rounding gives 1.467. Truncation matches what you get when you stop long division at a particular step, while rounding gives the closest approximation.

Does this calculator work with negative numbers and decimals?

Yes. You can enter any combination of positive or negative integers and decimal numbers for both the dividend and the divisor. When signs differ the result is negative; when both are negative the result is positive. The quotient and remainder are computed in the scaled integer domain to avoid floating-point precision errors from working with raw decimal arithmetic.

How do I verify my long-division answer?

Multiply the quotient by the divisor and add the remainder. The result must equal the original dividend. For 127 divided by 4: 31 times 4 equals 124, plus remainder 3 equals 127. The verification output on this calculator confirms this for you automatically.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…