CalculatorForEver
MATH / CALCULATOR

Remainder Calculator

Calculate remainder with worked steps, clear input conventions and a result table.

With truncating quotient q = trunc(a/b), the remainder is r = a − bq. For −23 divided by 7, q = −3 and r = −2, because −23 = 7×(−3) + (−2).

Your numbers

BROWSER-LOCAL INPUTS

Your inputs stay in this browser. No account needed.

RESULT

Your result

Enter your values and select Calculate.

Check the units and assumptions before using this result.

METHOD

How the remainder calculator works

How to use this calculator

Enter the values in the stated format. Calculate and review the method, exact distinctions and any numerical limits before using the result.

What the result means

A remainder records what is left after dividing an integer by whole multiples of another integer. This calculator truncates the quotient toward zero, then subtracts that quotient times the divisor from the dividend. Positive-only school examples usually agree with Euclidean modulo, but negative inputs reveal the convention. Use the displayed quotient and remainder together: neither alone fully describes the division. The divisor must be nonzero, and the integer inputs must fit the supported exact range.

The formula

Quotient = trunc(a/b); remainder = a − divisor × quotient

A worked example

17 divided by 5 has quotient 3 and remainder 2.

Assumptions & methodology

Use consistent units and inspect the displayed working. Numerical results are rounded for display; unsupported or unstable inputs are rejected. Results are rounded for display; intermediate calculations retain precision. This tool is informational and does not replace institutional or professional guidance.

References

MDN: remainder and modulo conventions

WORK THROUGH THE DETAILS

Using your remainder result

Compare the same negative example with modulo

Euclidean modulo with positive modulus 7 places −23 in the nonnegative range 0 through 6. It uses quotient −4, since −23 = 7×(−4) + 5, and therefore returns 5. The Remainder Calculator returns −2 because it uses quotient −3. Both equalities are valid, but they answer differently defined remainder questions. Use the Modulo Calculator for cycle positions that must remain nonnegative, and this tool when you need a truncating integer division result.

Avoid confusing a remainder with a fractional part

Dividing 29 by 8 gives quotient 3 and remainder 5. The fraction still to divide is 5/8, or 0.625. The remainder is 5, not 0.625, because it retains the dividend’s grouping unit. For a packing example, 29 objects in boxes of capacity 8 make three full boxes and leave five objects. Buying enough boxes for every object needs a ceiling calculation, four boxes. The number of full groups and the number of required containers answer different questions.

Use exact integers for divisibility checks

A remainder of zero is a direct check that the divisor divides the dividend. For 144 divided by 12, the quotient is 12 and there is nothing left over. Browser arithmetic has a finite exact-integer range, so extremely large entries can lose a unit before the division begins. The calculator rejects unsupported integer values instead of promising exact divisibility beyond that range. For a written sequence of division steps using nonnegative values, use Long Division; for prime decompositions, use Prime Factorization.

Distinguish a divisor from the number of groups

For 31 objects divided into groups of 6, there are five full groups with one object left. If the task instead divides 31 objects among six groups, each group can receive five whole objects and one object remains unassigned. The same integer division supports both interpretations, but the quotient and remainder carry different practical units. Write what the divisor counts before using the result in a packing, allocation or scheduling decision. Remainder arithmetic does not decide which group gets an extra item or whether a partial group is permitted.

INTERPRETATION

Understanding remainder results

Rebuild the dividend from quotient and remainder

For 23 divided by 7, three complete groups account for 21 and leave 2. The identity is 23 = 7×3 + 2. Rebuilding the original number checks the output without another division. If the remainder is nonzero, the exact quotient can also be written q + r/b. Here it is 3 + 2/7. A displayed decimal such as 3.285714 is rounded; the quotient-and-remainder identity preserves the exact integer relationship.

Track the sign under truncating division

Truncation moves a quotient toward zero. For −23/7, −3.2857 becomes −3, not −4. The resulting remainder is −2. For 23/(−7), the quotient is −3 and the remainder is 2. Under this convention, a nonzero remainder has the dividend’s sign, while its magnitude is smaller than the divisor’s magnitude. A zero remainder means exact divisibility regardless of the input signs. Read a negative result according to this rule rather than changing its sign by inspection.

RELATED GUIDES

Related questions and worked examples

Read a worked explanation before trying another calculation.

QUESTIONS

Remainder questions

Can I divide zero by a nonzero integer?+

Yes. The quotient and remainder are both zero because 0 equals the divisor times 0 plus 0.

Is division by zero a remainder of zero?+

No. A zero divisor does not define a quotient or remainder, so the calculator rejects that input.