Skip to content

Remainder Calculator

Divide integers exactly and compare nonnegative Euclidean remainders with truncation-toward-zero remainders.

Calculation inputs

Whole integer, absolute value up to 10¹².
Nonzero whole integer.

Precision & interpretation

Both conventions are shown explicitly. Zero is not an allowed divisor. The grouping sketch uses a bounded number of representative blocks rather than drawing billions of groups.

Calculation results

Remainder r2Euclidean remainder · 0 ≤ r < |b|
Integer quotient q3
Reconstruction17 = 5 × (3) + (2)
Other conventionq = 3, r = 2
Step-by-step solution
  1. Choose the formula

    a = bq + r
  2. Substitute your inputs

    17 = 5q + r
  3. Calculate in order

    q = 3; r = 17 − (5) × (3)
  4. Write the result

    17 = 5 × (3) + (2)

Division identity

Dividend17Divisor5Quotient3Remainder2

Identity: a = bq + r. Blocks represent quantities; their on-screen sizes do not encode magnitude.

Exact integer reconstruction. The Euclidean remainder is nonnegative for either divisor sign.

Exact value & calculation details
2
QuantityValue
Dividend17
Divisor5
Quotient3
Remainder2

Understand the calculation

Concept & meaning

Integer division writes a dividend as a whole-number multiple of the divisor plus a remainder. The reconstruction a = bq + r is checked with exact integer arithmetic.

Formula & special cases

In Euclidean division the remainder is nonnegative and smaller than |b|. With a negative dividend, the quotient may differ from a programming-language quotient truncated toward zero.

Precision & limitations

Both conventions are shown explicitly. Zero is not an allowed divisor. The grouping sketch uses a bounded number of representative blocks rather than drawing billions of groups.

a=bq+r;0≤r<|b|

Worked example from your inputs

Euclidean remainder · 0 ≤ r < |b| = 2

Sources & References

NIST official logoNIST DLMF · CongruencesInteger divisibility and number-theory notationRead the referenceNIST official logoNIST DLMF · Number theoryPrime powers and divisor functionsRead the reference

References explain the mathematics; they do not imply institutional endorsement.