Remainder Calculator
This remainder calculator divides an entered dividend by a nonzero divisor and returns a quotient truncated toward zero together with the remainder. For 17 divided by 5, the integer quotient is three and the remainder is two. The identity 17 = 5 × 3 + 2 shows how the two outputs fit together.
Loading calculator. JavaScript is required.
Your result
The remainder calculator keeps a nonzero remainder on the same side of zero as the dividend. For -17 divided by 5, the quotient is negative three and the remainder is negative two. This truncating convention differs from floor-based modulo for some signed inputs. Check which definition your problem requires before comparing answers from different tools.
On this page
- How to use the remainder calculator
- Truncate the quotient toward zero
- Three worked division examples
- Remainder calculator checks for signs and exact division
- Remainder calculator decimal precision and limits
- Interpret the quotient and remaining value together
- Questions about remainder calculator
- Sources and method notes
How to use the remainder calculator
Enter dividend a as the number being divided and divisor b as the number dividing it. A nonzero divisor is required. Supported signed whole numbers and finite decimals are accepted. Use a decimal point without grouping commas, then calculate to see the integer quotient and the remaining value.
The remainder calculator reports an integer quotient, not the complete decimal answer to ordinary division. Three with remainder two is a different representation from 3.4 when dividing seventeen by five. Reversing the inputs changes the question: five divided by seventeen has integer quotient zero and remainder five under this convention.
Truncate the quotient toward zero
The calculation uses q = trunc(a/b), followed by r = a - bq. Truncation discards the fractional part of the exact quotient by moving toward zero. For 3.4, this gives three. For -3.4, it gives negative three. It does not round to the nearest integer or always move downward as floor does.
The remainder has magnitude smaller than the divisor's magnitude. When it is nonzero, it has the same sign as a, the dividend. The remainder calculator uses exact decimal ratios within its supported range to choose the quotient and remaining value. It avoids deciding the quotient from a rounded decimal display that might have lost a small fractional difference.
Three worked division examples
Example one uses a = 17 and b = 5. The exact quotient is 3.4, so truncation gives q = 3. Subtracting fifteen from seventeen leaves r = 2. The check is 5 × 3 + 2 = 17. The remainder's magnitude is smaller than five, and its sign agrees with the positive dividend.
Example two uses a = -17 and b = 5. Truncating -3.4 toward zero gives q = -3. The remainder is -17 - 5 × (-3) = -2. Its negative sign agrees with the dividend. Selecting the floor quotient negative four would instead produce positive three, which belongs to the modulo convention rather than this remainder calculation.
Example three uses a =5.5 and b =2. The exact quotient is 2.75, so the integer quotient is two and the remainder is 1.5. Multiplying the divisor by two gives four; adding 1.5 reconstructs 5.5. A fractional remainder is permitted when the inputs themselves are decimal values.
Remainder calculator checks for signs and exact division
The remainder calculator permits a negative divisor. With 17 divided by -5, the quotient is -3 and the remainder is 2 because (-5) × (-3) + 2 = 17. The nonzero remainder still follows the dividend's sign, even though the divisor is negative. Retain both signs when checking the reconstruction.
Exact division leaves remainder zero. For -15 divided by 5, the quotient is -3 and the remainder is zero. A zero dividend with any allowed nonzero divisor also gives zero for both outputs. Check the quotient rule as well as a = bq + r and |r| < |b|; reconstruction alone does not distinguish truncating division from other conventions.
Remainder calculator decimal precision and limits
The remainder calculator supports input magnitudes up to 1,000,000,000,000 and at most twelve effective decimal places after normalization. Trailing zeros do not add precision. Scientific notation is supported with exponents from negative twenty-four through positive twenty-four, when the resulting value still meets the magnitude and decimal-place limits.
Finite decimal inputs are converted to scaled integers so the remainder is exact in that entered decimal model. For 0.3 divided by 0.2, the integer quotient is one and the remainder is 0.1. A direct floating-point percent operation in some software may show different last digits. The tool does not infer additional digits from an input that was rounded before you entered it.
Interpret the quotient and remaining value together
For positive whole-number counts, the quotient can describe complete groups and the remainder the items left after forming those groups. Seventeen items grouped in fives give three complete groups and two items left. You can recover the ordinary division value as q + r/b: for seventeen divided by five, this is 3 + 2/5 = 3.4. If the problem involves negative quantities or measurements, define what a signed remaining value means before applying that interpretation.
This remainder calculator evaluates one stated truncating division. It does not choose between division conventions for you, solve a long-division expression entered as text or infer how many physical groups are practical. Preserve both original numbers, the complete integer quotient, the remainder and any units with an exported answer. The remainder alone does not describe the original division problem.
Questions about remainder calculator
What does the remainder calculator return?
It returns an integer quotient selected by truncating the exact quotient toward zero, plus r = a - bq. The original dividend can be reconstructed as divisor times quotient plus remainder. A nonzero remainder has the dividend's sign and a magnitude smaller than the divisor's magnitude. The tool states this convention explicitly because signed division can use other rules.
Is three remainder two the same number as 3.2?
No. When dividing seventeen by five, the quotient-and-remainder statement represents 17 = 5 × 3 + 2. The corresponding ordinary division value is 3.4 because the remaining two is two fifths. Writing 3.2 would mean three and two tenths, which is a different value. Keep the divisor when interpreting a quotient and remainder.
Why is the remainder negative for a negative dividend?
This page truncates the quotient toward zero. For -17 divided by 5, that quotient is -3, leaving -2 after subtracting 5 × (-3). The remaining value therefore has the same sign as the dividend. A floor-based convention would choose -4 and leave positive 3. Compare the quotient rule before treating those two answers as a contradiction.
Can the remainder calculator accept a negative divisor?
Yes. For 17 divided by -5, the quotient is -3 and the remainder is positive 2. The remainder follows the positive dividend, not the negative divisor. Their reconstruction is (-5) × (-3) + 2 = 17. If both inputs are negative, the quotient is positive and a nonzero remainder remains negative under this truncating convention.
Can a remainder contain a decimal part?
Yes, when the supported inputs are finite decimals. For 5.5 divided by 2, the integer quotient is two and the remainder is 1.5. The remainder must still have magnitude smaller than the divisor. Enter the numbers as decimals in their separate fields, and retain the scale or physical units if those values represent measurements.
How is this different from modulo for signed inputs?
This page selects a quotient by truncating toward zero, so a nonzero remainder follows the dividend's sign. Floor-based modulo selects a floor quotient and follows the divisor's sign. The outputs often agree for positive inputs and may differ when the signs differ. Different programming languages assign different conventions to the percent symbol, so consult their documentation.
What happens if the divisor is zero?
The calculator rejects it because no defined quotient is available for the required decomposition. This also applies when the dividend is zero. Entering zero as the divisor is not the same as obtaining a valid zero remainder after exact division. A zero remainder is possible only after a division with a permitted nonzero divisor.
Does a zero remainder mean the quotient is zero?
No. A zero remainder means the dividend is an exact integer multiple of the nonzero divisor. Fifteen divided by five has quotient three and remainder zero. A zero quotient instead means the exact quotient lies between negative one and one under truncation. In that case the remaining value equals the dividend, unless the dividend itself is zero.
Why can a direct program show 0.099999 instead of 0.1?
Binary floating-point arithmetic cannot represent every finite decimal exactly. A direct numeric remainder operation may therefore retain a small rounding difference. This tool treats supported decimal inputs as exact scaled integers before division, so 0.3 divided by 0.2 leaves exactly 0.1 in the stated decimal model. That does not recover digits omitted from an already rounded measurement.
What numerical precision can I enter?
Input magnitudes are limited to one trillion, with at most twelve effective decimal places after normalization and a bounded supported exponent. Trailing fractional zeros are removed before checking precision. The form accepts finite numeric inputs rather than arbitrary-length expressions or symbolic values. Preserve the original decimal text when another person needs to reproduce the exact input model.
What should accompany a copied or downloaded result?
Keep dividend a, divisor b, the truncating convention, the full integer quotient and the remainder. State any units separately. The CSV contains the current result rather than a history of every input attempt, so keep the matching inputs as well. This allows reconstruction and prevents a remainder from being mistaken for the decimal part of the ordinary quotient.
Sources and method notes
Method and source notes checked on 26 November 2026. The diagrams are original explanatory drawings. Read the privacy policy for other site services.