Long Division Quotient and Remainder Calculator

Fast long division for clean quotient and remainder results. Handles negatives and big numbers with exact arithmetic reliably. Shows stepwise working and verifies identity equals relation always. Choose remainder convention that suits your application best. Export CSV, print to PDF, share results instantly anywhere.

Enter Values

Examples: 98765, -137, 0
Examples: 123, -5, 7

Example Data (click to fill)

ExampleModeUse
98765 ÷ 123 euclidean
255 ÷ 16 euclidean
-137 ÷ 12 euclidean
37 ÷ -5 euclidean
1000 ÷ 7 (truncated) truncated
0 ÷ 9 euclidean

Result

Download CSV
Enter values and press Calculate to see results.

Formula Used

For integers a (dividend) and b (divisor ≠ 0), we find integers q and r such that a = b·q + r.

  • Euclidean convention: remainder r is unique with 0 ≤ r < |b|. Quotient is q = (a - r)/b.
  • Truncated convention: q = trunc(a/b) and r = a - b·q; here r may be negative.

How to Use This Calculator

  1. Enter integer values for dividend and divisor (divisor ≠ 0).
  2. Select a remainder convention: Euclidean (non‑negative remainder) or Truncated.
  3. Optionally enable Show long division steps for digit‑by‑digit working.
  4. Press Calculate to display quotient, remainder, and identity check.
  5. Use Download CSV to export results and detailed steps; use Save as PDF to print or save.

FAQs

Euclidean guarantees a non‑negative remainder r with 0 ≤ r < |b|. Truncated uses a quotient truncated toward zero; the remainder can be negative.

Yes. The algorithm handles all integer signs. For steps, we divide absolute values and apply the sign to the final quotient as needed.

Because we compute q and r from exact integer arithmetic, then verify by reconstruction: a - (b·q + r) = 0 within integer arithmetic.

Typical 64‑bit integer ranges work well. The step simulation avoids overflow by using per‑digit operations on strings for the dividend.

Yes. Use Download CSV for spreadsheets. For documents, use Save as PDF to print the result view.

Example Data Table

Dividend Divisor Mode Quotient Remainder
98765 123 euclidean 802 119
255 16 euclidean 15 15
-137 12 euclidean -12 7
37 -5 euclidean -7 2
1000 7 truncated 142 6
0 9 euclidean 0 0

Remainder Conventions Compared (Worked Examples)

See how truncated and Euclidean conventions differ for the same inputs. This clarifies sign behavior and remainder ranges.

Dividend (a) Divisor (b) Truncated q Truncated r Euclidean q Euclidean r
-375-7-2-83
37-5-72-72
2551615151515
1000714261426
-13712-11-5-127
12345689138713138713
Reminder: Euclidean remainder satisfies 0 ≤ r < |b|, while truncated can yield negative remainders.

Divisibility Quick Reference (Remainder Rules)

Handy tests and remainder ranges used when planning or checking long division operations.

Divisor Quick Test Possible Remainders (Euclidean)
2Last digit even0 or 1
3Sum of digits divisible by 30,1,2
4Last two digits divisible by 40–3
5Ends with 0 or 50–4
6Divisible by 2 and 30–5
8Last three digits divisible by 80–7
9Sum of digits divisible by 90–8
10Ends with 00–9
11Alternating digit sum rule0–10
12Divisible by 3 and 40–11
Euclidean remainders always lie in [0, |b|). Truncated remainders may be negative.

Related Calculators

Proportion and Ratio Calculatorsquare root calculator with stepsnegative square root calculatorfraction square root calculatorsquare root division calculatordecimal to square root calculatorderivative of square root calculatorharmonic mean calculatorbinomial distribution mean calculatordiscrete random variable mean calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.