ratio.

Find a tool

Browse all tools and categories ↗
MATHEMATICS

Integer Quotient and Remainder Calculator

Divide signed integers with a nonnegative remainder. Verify the identity and use the same modulo convention for cyclic positions and clock arithmetic.

Enter your values

01 / INPUT
Calculated on your device

YOUR CALCULATION

Result

—

Calculation steps

Work through one step at a time or reveal the complete calculation. The steps use your current inputs.

    How to calculate

    Find integers q and r such that a=bq+r and0≤r<|b|. If ordinary truncating division produces a negative remainder, adjust the quotient by one step and add the absolute divisor to the remainder.

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

    Worked example

    −17=5×(−4)+3, so the quotient is−4 and the nonnegative remainder is3. With divisor−5, −17=(−5)×4+3.

    Assumptions and input details

    Enter signed integers of at most40 digits. The divisor may be negative but cannot be zero. This is Euclidean division; some programming languages use a different signed-remainder convention. Exact integer arithmetic is used.

    Using this calculator

    Can I enter my own problem?

    Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.

    Are the results exact?

    Integer and fraction results are exact within the documented limits. Radical decimal values and plotted interval positions are approximate.

    Is my input uploaded?

    The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.

    RELATED TOOL · MATHEMATICSGCD and LCM Calculator

    Find the exact greatest common divisor and least common multiple of 2–20 integers. Inspect progressive reductions, divisibility checks and Euclidean division steps.

    RELATED TOOL · MATHEMATICSPrime Factorization Calculator

    Factor a positive integer up to one trillion. See prime powers, primality, divisor count, the exact divisor sum and a sorted divisor table.

    RELATED TOOL · COMPUTINGNumber Base Converter

    Convert a signed integer between bases 2–36 using exact arithmetic. Compare binary, octal, decimal, hexadecimal and base-36 values with place-value steps.

    ADVERTISEMENT

    Reserved advertising space.