Floor Division Calculator
Enter both values to instantly get the floor division result.
Updated
Floor Division Calculator
Our Floor Division Calculator divides one number by another and rounds the result down to the nearest integer. Results update automatically as soon as both fields are filled, and the remainder is shown alongside.
Quick answer
Floor division divides and then rounds down to a whole number: a // b = ⌊a ÷ b⌋. For example, 17 // 5 = 3, because 17 ÷ 5 = 3.4. Enter any two numbers above, including decimals or negatives, and the calculator shows the result and the remainder instantly.
- Formula: floor quotient = ⌊dividend ÷ divisor⌋
- Remainder: dividend − divisor × floor quotient, e.g. 17 − 5 × 3 = 2
- Negatives round down, not toward zero: −7 // 2 = −4 (remainder 1)
- Same as Python’s
//and%operators; dividing by 0 is undefined
Floor Division Formula
Floor division divides a by b, then rounds the quotient down to the nearest integer — even for negative results, which round toward negative infinity rather than toward zero.
Example Calculations
7 // 2 = ⌊3.5⌋ = 3 (remainder 1)
−7 // 2 = ⌊−3.5⌋ = −4 (remainder 1)
Key Terms
- Dividend
- The number being divided (17 in 17 // 5).
- Divisor
- The number you divide by (5 in 17 // 5).
- Floor
- The largest whole number less than or equal to a value, written ⌊x⌋: ⌊3.4⌋ = 3 and ⌊−3.5⌋ = −4.
- Floor quotient
- The result of floor division: the floor of dividend ÷ divisor.
- Remainder
- What is left over: dividend − divisor × floor quotient. It has the same sign as the divisor.
How to Use the Floor Division Calculator
- Enter the number to divide. Type the dividend in the “Number to divide” box. Whole numbers, decimals and negative numbers all work.
- Enter the divisor. Type the number to divide by in the “Divide by” box. It cannot be 0. Pressing Enter in the first box also moves you here.
- Read the floor quotient. The result, rounded down to a whole number, appears as soon as both boxes have a number, together with the working and the remainder (for example 17 // 5 = ⌊3.4⌋ = 3 · remainder 2).
- Copy or divide again. Press Copy to copy the result, or “// Divide again” to floor-divide the result by another number, for example to turn seconds into minutes and then hours. Press Clear or Esc to start again.
Who Can Use This Calculator?
Frequently Asked Questions (FAQs)
What is floor division?
Floor division divides one number by another and rounds the result down to the nearest whole number: a // b = ⌊a ÷ b⌋. For example, 17 // 5 = 3, because 17 ÷ 5 = 3.4 and 3.4 rounded down is 3.
How is floor division different from normal division?
Normal division keeps the fractional part (17 ÷ 5 = 3.4); floor division drops it by rounding down, so the answer is always a whole number (17 // 5 = 3). The part that does not fit is the remainder, here 2.
How does floor division work with negative numbers?
It always rounds down, toward negative infinity, not toward zero. So −7 // 2 = −4, because −7 ÷ 2 = −3.5 and the next whole number below −3.5 is −4. Simply cutting off the decimals (truncation) would give −3 instead.
What is the remainder in floor division?
The remainder is a − b × (a // b), and it always has the same sign as the divisor. For 17 // 5 the remainder is 17 − 5 × 3 = 2; for −7 // 2 it is −7 − 2 × (−4) = 1.
What does // mean in Python?
In Python, // is the floor division operator: 17 // 5 returns 3 and −7 // 2 returns −4. The % operator gives the matching remainder (17 % 5 is 2), and divmod(17, 5) returns both as (3, 2). This calculator follows the same rules.
Can I use decimals?
Yes. The result is still rounded down to a whole number: 7.5 // 2 = 3 with remainder 1.5, and 0.3 // 0.1 = 3.
What happens if I divide by zero?
Division by zero is undefined, so there is no answer. The calculator tells you that you can’t divide by zero and asks for a divisor other than 0.
Is the Floor Division Calculator free?
Yes. It is completely free, needs no sign-up, and can be used as many times as you like.
Try our Floor Division Calculator to round down any division instantly.