The term residue has several meanings in mathematics.

In complex analysis, the residue is a complex number which describes the behavior of path integrals of a meromorphic function around a singularity.

In modular arithmetic, the residue of an integer n to base b is the remainder r after the largest multiple mb of b no greater than n has been subtracted from n (if n < 0, one adds multiples of b just sufficient to make the result non-negative). The residues modulo (to the base) b form a ring.