Input values
Enter dividend and divisor pairs in each row. Add or remove rows as needed, then click Calculate floor division to generate results.
Example floor division table
These examples illustrate how floor division behaves with positive and negative operands. Notice how the floor moves toward negative infinity, not simply toward zero.
| Dividend (a) | Divisor (b) | Exact quotient (a / b) | Floor quotient ⌊a / b⌋ | Remainder r | Check: a = b × ⌊a / b⌋ + r |
|---|---|---|---|---|---|
| 7 | 3 | 2.3333… | 2 | 1 | 7 = 3 × 2 + 1 |
| -7 | 3 | -2.3333… | -3 | 2 | -7 = 3 × (-3) + 2 |
| 7 | -3 | -2.3333… | -3 | -2 | 7 = (-3) × (-3) + (-2) |
| -7 | -3 | 2.3333… | 2 | -1 | -7 = (-3) × 2 + (-1) |
Formula used
Given a dividend a and a non-zero divisor b, the floor division quotient is defined as the greatest integer less than or equal to the exact quotient:
⌊a / b⌋ = max { k ∈ ℤ : k ≤ a / b }.
The remainder r is then computed using the identity
a = b × ⌊a / b⌋ + r. For true floor division, r has the same
sign as the divisor and satisfies 0 ≤ r < |b|.
This tool also shows the ceiling quotient ⌈a / b⌉ and the truncated quotient taken toward zero. Comparing these values helps you understand alternative integer division conventions used in programming languages and number theory.
This calculator uses floating-point arithmetic to find the exact quotient, applies the floor function, and then recomputes the remainder from the defining equation.
How to use this calculator
- Enter the dividend a in the first column for each row.
- Enter the divisor b in the second column, ensuring it is not zero.
- Use the Add another row button to compare several pairs at once.
- Click Calculate floor division to generate the table of results.
- Review the exact quotient, integer floor quotient, and remainder for each line.
- If needed, adjust inputs and run the calculation again for new scenarios.
- When satisfied, export the results using the CSV or PDF download buttons.
This tool is especially useful when translating real-number quotients into exact integer-based results for algorithms, modular arithmetic, and discrete computations.
Key properties of floor division
- ⌊a / b⌋ always returns an integer, even for decimals.
- For positive a and b, floor division matches truncation toward zero.
- For negative values, the quotient moves toward negative infinity.
- The identity a = b × ⌊a / b⌋ + r always holds.
These properties make floor division reliable for indexing, partitioning data, chunking ranges, and building discrete algorithms where exact real quotients are less useful than stable integer boundaries.
Common applications of floor division
- Splitting items into fixed-size groups and counting full groups only.
- Mapping real-valued coordinates into grid cells or array indices.
- Computing pagination offsets from page numbers and page sizes.
- Implementing modular arithmetic routines with predictable remainders.
By combining floor quotients with remainders, you can design robust integer algorithms that behave consistently across both positive and negative values.
Comparing floor, ceiling, and truncation
Floor division returns the greatest integer less than or equal to a / b. Ceiling division instead returns the smallest integer greater than or equal to a / b, while truncation simply drops the fractional part toward zero.
This calculator presents all three quotients together so you can verify which convention matches your programming language, mathematical reference, or specific algorithmic requirements before implementing logic in code.
Frequently asked questions about floor division
1. What does floor division actually compute?
Floor division returns the greatest integer less than or equal to the exact quotient a / b. It always produces an integer, even when the original numbers are decimals or negative values.
2. How is floor division different from normal division?
Normal division keeps the fractional part, like 7 ÷ 3 = 2.3333…. Floor division instead returns ⌊7 / 3⌋ = 2 and separates the leftover part into a remainder term.
3. Why does floor division behave differently with negatives?
For negative results, the floor must move toward negative infinity. That means ⌊-7 / 3⌋ becomes -3, not -2, because -3 is still less than or equal to -2.3333….
4. What is the remainder in floor division?
The remainder r is defined by a = b × ⌊a / b⌋ + r. For true floor division, r has the same sign as b and satisfies the inequality 0 ≤ r < |b|.
5. When should I use floor division in programming?
Use floor division whenever you need stable integer boundaries: grid indexing, chunking ranges, grouping items, or implementing algorithms that depend on predictable quotients and remainders across negative and positive numbers.
6. Is this calculator suitable for decimal inputs?
Yes. You can enter both integers and decimal values for dividends and divisors. The calculator still applies the floor to the exact real quotient and then recomputes the matching remainder term.
7. Can I export results for documentation or reports?
Absolutely. After running your calculations, use the CSV button for a spreadsheet-friendly file or the PDF button for a formatted document that preserves headers, rows, and numeric precision.