Integer Division with Remainder
Find the quotient rounded toward zero and the remaining signed amount.
Your numbers
Quotient
Use consistent units. The result follows the assumptions you enter.
Scenario comparison
Up to three snapshots in this tab. Loading one replaces the current inputs.
Formula
Use q = trunc(a/b) and r = a−bq. a is dividend and b is nonzero divisor. trunc rounds toward zero; q is quotient and r is the signed remainder.
Find the quotient rounded toward zero and the remaining signed amount.
Worked example
- Dividend
- 17
- Divisor
- 5
- Quotient
- 3
- Remainder
- 2
Scope and limitations
Use consistent units. The result follows the assumptions you enter.
Inputs are checked for missing values and allowed ranges. A result outside the finite numeric range is not displayed. Rounding affects display, while the calculation uses the model’s numeric precision.
Check your units and assumptions before relying on a result. Changing a label does not convert a currency or physical unit.
Formula version: 2d7fd61795a1 · Example checked: