Home

remainder

A remainder is the amount left over after dividing one number by another. For integers a and b with b ≠ 0, there exist unique integers q and r such that a = bq + r and 0 ≤ r < |b|. Here q is the quotient and r is the remainder. This form is known as Euclidean division.

Remainders are used to measure divisibility and to perform modular arithmetic. In modular arithmetic, r is

In the division of polynomials, dividing f(x) by a nonzero polynomial d(x) yields f(x) = q(x)d(x) + r(x),

In computing and programming, the remainder is obtained by the modulo operation, often denoted a mod b.

Example: 17 divided by 5 gives a quotient of 3 and a remainder of 2, since 17

A related concept is the remainder theorem in algebra: the remainder of f(x) divided by x − c

the
representative
of
the
residue
of
a
modulo
b,
written
a
≡
r
(mod
b).
The
remainder
determines
cyclic
patterns,
congruences,
and
computations
that
depend
only
on
the
division
remainder
rather
than
the
full
value
of
a.
where
r(x)
has
degree
less
than
that
of
d(x).
The
remainder
r(x)
is
unique
and
plays
a
role
analogous
to
the
integer
remainder
in
arithmetic.
Different
programming
languages
may
adopt
different
conventions
for
the
sign
of
the
remainder
when
a
is
negative,
but
the
underlying
concept
remains
the
amount
left
over
after
division.
=
5×3
+
2.
For
negative
dividends,
conventions
vary;
under
the
common
nonnegative
remainder
convention,
-17
=
5×(-4)
+
3,
so
the
remainder
is
3.
is
f(c).