Home · Everyday · Arithmetic · Remainder Calculator

Remainder Calculator

Find what is left over after one number is divided by another, using the mathematical remainder that follows the divisor's sign.

Your figures

The divisor can never be zero

Example result — edit the figures to make it yours

5

Remainder

Computed from the inputs on this page with the formula below — change any figure and every result updates.

Whole-number quotient35

What this calculator does

Find what is left over after one number is divided by another, using the mathematical remainder that follows the divisor's sign. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.

The formula and method

r = a − b × floor(a / b), with r taking the sign of b

The remainder is what remains after the divisor has been taken out of the dividend as many whole times as possible: a = b × q + r. This calculator uses the mathematical convention, where q is the floor of a ÷ b, so the remainder always has the same sign as the divisor and satisfies 0 ≤ r < b for a positive divisor. For 250 ÷ 7 the quotient is 35 and the remainder is 5.

That convention differs from the truncated remainder used by the % operator in languages like C and Java, which rounds the quotient toward zero and gives the remainder the sign of the dividend instead; the two disagree only when exactly one of the numbers is negative. Whichever convention a problem expects, the divisor must be non-zero, and checking b × q + r = a confirms any hand calculation.

Worked example

With the example inputs this page opens with (dividend (a) 250, divisor (b) 7), the result is 5.0000 — remainder. Computed from the inputs on this page with the formula below — change any figure and every result updates.

Quick reference

Quick reference — varying Dividend (a)
Dividend (a)RemainderWhole-number quotient
5017
100214
250535
365152
500371
10006142

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

Can a remainder be negative?

Under the mathematical convention used here, no, not with a positive divisor: the remainder always lands between 0 and the divisor. Truncated remainders in some programming languages can be negative.

How does the Remainder Calculator work?

Find what is left over after one number is divided by another, using the mathematical remainder that follows the divisor's sign. Dividend a · Divisor b → Remainder. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Remainder Calculator need?

Dividend a · Divisor b → Remainder. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the Remainder Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.