Beginner

Remainder Calculator — Integer Division with Steps

Divide any two whole numbers to get the quotient and remainder — with the full a = b × q + r breakdown shown step by step and illustrated on a number line.
The number to be divided — can be negative
The number to divide by — cannot be zero
Remainder (r)
5

47 = 7 × 6 + 5

Dividend (a)
47
Divisor (b)
7
Quotient (q)
6
Remainder (r)
5
Modulo (always ≥ 0)
5
-24.811.518.32531.838.545.352a=47b×q=420Number line: a and b×q — the gap is the remainder
Step-by-step solution
1

Set up the division: 47 ÷ 7

47 ÷ 7
2

Find the quotient (ignore the fractional part)

quotient = trunc(47 / 7) = 6
3

Compute the remainder using a = b × q + r

remainder = 47 − (7 × 6) = 47 − 42 = 5
=

Verify

7 × 6 + 5 = 47 ✓ (= 47)
Step by step
  1. 1

    Quotient (integer part of a ÷ b)

    int(47 ÷ 7) = 6
  2. 2

    Product b × q

    7 × 6 = 42
  3. 3

    Remainder r = a − b × q

    47 − 42 = 5
    Check: b × q + r = a, so the identity a = b × q + r holds.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

For integers a ÷ b: quotient q = trunc(a / b), remainder r = a − b×q, and the check is a = b×q + r. For 47 ÷ 7: q = 6, r = 5, check: 7×6 + 5 = 47. The remainder always satisfies |r| < |b|. The modulo is the always-non-negative version of the remainder.

Formula
a = b × q + r where q = trunc(a / b) and 0 ≤ |r| < |b|
How this is calculated

Integer division splits a dividend a by a divisor b into a quotient q (how many times b fits into a) and a remainder r (what is left over). The fundamental relationship is always a = b × q + r. This calculator uses truncated division — q is the integer part of a/b with the fractional part discarded — which matches the behaviour of the % operator in most programming languages (C, Java, JavaScript, Python 3 for positive inputs).

For positive inputs the remainder r satisfies 0 ≤ r < b, and the modulo and remainder are identical. For negative dividends or divisors the two can differ: the modulo is always non-negative (it wraps to the positive side), while the remainder keeps the sign of the dividend. This distinction matters in programming: Python's % operator uses floored (modulo) division; C, Java and JavaScript use truncated (remainder) division.

The number line visualization shows where a and b × q lie — the gap between them is exactly the remainder r, making the a = b × q + r identity geometrically obvious.

Frequently asked questions

For positive numbers they are identical. They differ when the dividend is negative: with 47 ÷ −7, the truncated remainder is 5 (keeps the sign of the dividend), while the modulo is −2 (keeps the sign of the divisor). Most calculators and spreadsheet MOD() functions use the modulo (floored) convention.

This is the Division Algorithm: any integer a can be uniquely written as b multiplied by an integer quotient q plus a remainder r, where the remainder is strictly smaller in absolute value than the divisor. For example, 47 = 7 × 6 + 5.

Remainders appear throughout mathematics and computing: checking divisibility (a is divisible by b if r = 0), cyclic patterns (clock arithmetic, day-of-week calculations), hashing and modular arithmetic in cryptography, and as the core operation of the Euclidean GCD algorithm.

Also known as

remainder calculator
integer division remainder
quotient and remainder calculator
division with remainder step by step
modulo calculator
a mod b calculator
division algorithm remainder

APA

TG we-Calculate Editorial Team. (2026). Remainder Calculator — Integer Division with Steps [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/remainder-calculator

Chicago

TG we-Calculate Editorial Team. "Remainder Calculator — Integer Division with Steps." TG we-Calculate. 2026. https://we-calculate.com/calculator/remainder-calculator.

IEEE

TG we-Calculate Editorial Team, "Remainder Calculator — Integer Division with Steps," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/remainder-calculator

BibTeX

@misc{wecalculate_remainder_calculator, title = {Remainder Calculator — Integer Division with Steps}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/remainder-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?