Floor division: A simple step-by-step guide with examples

What is floor division?

Floor division is a way to divide numbers and end up with a whole number. It gives the largest whole number that is not bigger than the exact result. For positive numbers, that often means just dropping the decimal part. For negatives, it can push the result down to a more negative number.

How it works

Step 1 — Divide like usual

Do the normal division first. For example, 7 ÷ 2 = 3.5.

Step 2 — Round down

Round the result down to the nearest whole number. So 3.5 becomes 3. That final number is the floor division result.

Note about negatives

With negative numbers, rounding down goes toward minus infinity. For example, -7 ÷ 2 = -3.5, and rounding down gives -4. That can feel odd at first, but it is how floor works.

Examples

Here are a few quick ones you can check in your head:

7 ÷ 2 → 3.5 → floor = 3

10 ÷ 3 → 3.333… → floor = 3

-7 ÷ 2 → -3.5 → floor = -4

Floor division in code

Some languages have a special operator for it. In Python, for example, you use //. So 7 // 2 = 3 and -7 // 2 = -4. Other languages might just drop the decimal when dividing integers. That is called truncation and it behaves differently for negatives.

Common mistakes

People often expect truncation instead of floor. For positive numbers both look the same. For negatives they do not. Also, confusing the word “round” can cause trouble. Floor always goes down. It never goes up.

Practice problems

Try these on your own:

1) 9 ÷ 4

2) 3 ÷ 5

3) -9 ÷ 4

4) 14 ÷ 7

5) -3 ÷ 2

Answers

1) 2

2) 0

3) -3

4) 2

5) -2

Quick tips

If the result is positive, you can usually just drop the decimal. If it’s negative, remember to push the answer down to the next whole number. When you code, check how your language handles integer division so you get the answer you expect.

Wrap-up

Floor division is an easy idea once you see it. Divide, then round down. That’s it. But how does this affect you? If you work with indexes, chunks, or integer math, knowing it keeps your results correct and predictable.

Scroll to Top