# Floor Division Calculator

URL: https://speedycalculator.com/calculators/math/floor-division/
Last updated: 2026-10-30

> The floor division calculator divides two numbers and rounds the quotient down to the nearest integer (⌊a/b⌋, Python's //), with the matching remainder.

## Inputs

- Divide
- by

## Results

- Floor division
- Remainder (floored)
- Truncated division (towards zero)
- Exact quotient

## Formula

```
Quotient = ⌊dividend ÷ divisor⌋
Remainder = dividend − quotient × divisor
```

## Explanation

Floor division is integer division that always rounds towards −∞. It is what Python's // operator does and differs from truncation for negative numbers: −7 // 2 = −4, whereas truncating gives −3.

### How to use the Floor Division Calculator

- **Divide**
- **by**

Results update as you type, and everything is calculated in your browser.

### How it works

The exact quotient is computed and the floor function applied. The remainder then has the same sign as the divisor, matching the mathematical modulo operation.

### Inputs explained

FieldWhat to enterDivideA numberbyA number

### What each result means

- **Floor division** = floor([Divide]÷[by])
- **Remainder (floored)** = [Divide] - [by]×floor([Divide]÷[by])
- **Truncated division (towards zero)** = trunc([Divide]÷[by])
- **Exact quotient** = [Divide]÷[by]

### Example values

How the main result changes when **Divide** changes and everything else stays at the example values above:

DivideFloor division-3.5-2-5.25-3-7-4-8.75-5-10.5-6-14-7

## Worked example

Inputs — Divide: -7; by: 2.

Results — **Floor division = -4**; Remainder (floored) = 1; Truncated division (towards zero) = -3; Exact quotient = -3.5.

## Key terms

- **Floor function**: ⌊x⌋, the greatest integer ≤ x.

## FAQ

**What is 7 // 2?**
3.

**What is −7 // 2?**
−4, because floor(−3.5) = −4.

**How is floor division different from truncation?**
Truncation rounds towards zero; floor rounds down. They differ only for negative quotients.

**Which languages use floor division?**
Python (//), Ruby and R (%/%); C and Java truncate.


## Sources

- [OpenStax – Prealgebra 2e](https://openstax.org/details/books/prealgebra-2e)
- [OpenStax – Contemporary Mathematics](https://openstax.org/details/books/contemporary-mathematics)
