Mathematics calculator

Floor Division Calculator

Divide two real numbers, round the quotient toward negative infinity, and calculate the matching remainder.

Calculator inputs

Enter your values

Floor quotient
Calculated output

Result summary

Your result will appear here

Complete the required fields and select the calculate button.

A negative decimal quotient placed between integers with the lower integer selected by floor
Floor moves toward negative infinity, so floor(−2.5) is −3 rather than −2.

What Is Floor Division?

Floor division answers a practical question: how many whole intervals fit when the quotient must be rounded toward negative infinity? For positive values it looks like ordinary division followed by dropping the fraction. Negative values reveal the important difference. For example, −7 divided by 3 is about −2.333, so its floor is −3 rather than −2.

The calculator also reports the remainder that satisfies a = bq + r, where q is the floor quotient. This convention is useful in programming, repeating schedules, indexed groups, and number theory. It is worth checking which division convention a textbook or software tool uses, because “integer division” can instead mean truncation toward zero.

The Floor Division Calculator shows the floored quotient once as the main answer, with the ordinary quotient, matching remainder and reconstruction equation beneath it. It accepts decimals as well as integers. Use it when you need a lower whole interval, rather than rounding to the nearest integer or removing a minus sign’s fractional part.

How to Calculate Floor Division

  1. Enter Dividend a, the number being divided. Positive, negative, zero and decimal values are allowed.
  2. Enter Nonzero divisor b. It may be positive, negative or decimal, but cannot be zero.
  3. Select Calculate. Read the featured floor quotient and compare it with the ordinary quotient.
  4. Check the remainder with a = bq + r. Use the divisor’s sign when interpreting a nonzero remainder.

The page divides a by b using floating-point arithmetic and applies floor before calculating the remainder. The ordinary quotient and remainder round to ten decimal places. The floor quotient itself is an integer-valued result.

For positive quantities, floor division often describes complete groups. If 19 meters of material is divided into 4-meter pieces, the quotient is 4 and the remainder is 3 meters. Signed inputs instead follow a number-line convention; a negative quotient is not a negative physical count of pieces.

Floor Quotient and Remainder Formulas

q = ⌊a ÷ b⌋, with b ≠ 0

r = a − bq

Reconstruction: a = bq + r

If b > 0: 0 ≤ r < b

If b < 0: b < r ≤ 0

The floor brackets mean the greatest integer less than or equal to the quotient. If a ÷ b is already an integer, floor leaves it unchanged. Otherwise it selects the lower integer on the number line, including for negative quotients.

The PHP floor reference documents this direction. The Python arithmetic reference explains the corresponding floor-division and divisor-sign remainder convention. This page computes a/b then floor in PHP; it is not a guarantee of identical floating-point edge behavior to every Python expression.

The remainder bounds describe exact arithmetic. Floating-point representation can introduce small errors, particularly near an exact multiple. Ten displayed decimal places do not guarantee ten accurate places for every input.

Dividend, Divisor and Division Results

Dividend a
Value being divided; its unit is also the remainder’s unit when b is a pure count.
Divisor b
Nonzero dividing value. Its sign determines the sign of a nonzero floor remainder.
Floor quotient q
Featured greatest integer at or below a ÷ b.
Ordinary quotient
a ÷ b rounded to ten decimals. Floor uses the unrounded quotient.
Remainder r
a − bq rounded to ten decimals. It can be decimal and can be negative when b is negative.
Identity check
Reconstruction statement using the entered values, quotient and rounded remainder.

Floor Division Example with a Negative Number

Illustrative example. Divide −7.5 by 3. Ordinary division gives −2.5. The greatest integer at or below −2.5 is −3, so that is the floor quotient.

Find the remainder: r = −7.5 − 3 × (−3) = 1.5. Check the reconstruction: 3 × (−3) + 1.5 = −7.5.

Truncating −2.5 toward zero would give −2 instead. Its remainder would be −1.5, a different division convention. Use the quotient and remainder from the same convention together.

Calculation check. These illustrative values were checked independently against the formula and calculator response. Retain unrounded intermediate values when checking approximations.

Floor Division Example with a Negative Number
QuantityValue
Ordinary quotient−2.5
Floor quotient q−3
Remainder r1.5
Check a = bq + r−7.5 = 3 × (−3) + 1.5

Floor Division with Positive and Negative Divisors

A nonzero floor remainder follows the divisor’s sign. Check each row with a = bq + r rather than carrying a remainder across different rounding conventions.

Floor Division with Positive and Negative Divisors
a ÷ bOrdinary quotientFloor qRemainder r
7.5 ÷ 32.521.5
−7.5 ÷ 3−2.5−31.5
7.5 ÷ −3−2.5−3−1.5
−7.5 ÷ −32.52−1.5
−9 ÷ 3−3−30

How to Interpret the Quotient and Remainder

For positive inputs, a quotient of 4 means four complete divisor-sized groups fit. A positive remainder shows the amount left over. When signs are involved, interpret the pair algebraically and verify the reconstruction equation rather than treating the remainder as a physical leftover automatically.

If both numbers are measurements, the quotient is only a count when their units are compatible. Dividing 20 metres by 3 metres produces a dimensionless group count; dividing unlike quantities produces a rate or compound unit. Keep enough decimal precision in the inputs for the intended use.

A useful way to visualize the rule is to mark multiples of the divisor on a number line. With divisor 3, the surrounding multiples for −7.5 are −9 and −6. The floor quotient selects the lower interval index, −3, and the remainder measures 1.5 units forward from −9. This picture explains why simply removing decimal digits gives the wrong answer for negative quotients.

In computer work, confirm the language or database definition before transferring a result. Some operators truncate, some implement mathematical floor, and some define remainders with a different sign. Stating both q and r removes ambiguity. For money or measured quantities, binary decimal arithmetic can introduce tiny representation differences, so choose an appropriate display precision and verify against the reconstruction equation.

When the quotient is already an integer, flooring changes nothing and the remainder is zero. This boundary case is a quick check on both entered values.

A negative divisor changes the remainder rule. For 7.5 ÷ −3, q = −3 and r = −1.5, because −3 × −3 − 1.5 = 7.5. For −7.5 ÷ −3, q = 2 and r = −1.5. A remainder does not automatically carry the dividend’s sign.

Floor agrees with truncation for a nonnegative quotient or an exact integer quotient. For a negative noninteger quotient, floor is one less than truncation. Rounding to the nearest integer is a third rule and can differ from both.

Binary decimal approximations can cross an integer boundary. In this implementation, 0.3 ÷ 0.1 can floor to 2 because the internal quotient is slightly below 3, even though the exact decimal quotient is 3. Scale to exact integer units or use exact decimal arithmetic when such boundaries matter.

Common Floor Division Mistakes

  • Dropping the fractional part of a negative quotient instead of moving downward.
  • Assuming a nonzero remainder must be positive even with a negative divisor.
  • Confusing rounding to nearest with rounding toward negative infinity.
  • Using zero as the divisor.
  • Calculating floor from the displayed rounded ordinary quotient rather than the internal value.
  • Expecting binary floating-point arithmetic to recognize every exact decimal multiple.

Frequently Asked Questions

What does floor division mean?

It divides two numbers and selects the greatest integer at or below their quotient. For −7.5 ÷ 3, it returns −3.

Why is the floor of −2.5 equal to −3?

Floor moves toward negative infinity. Since −3 is below −2.5 and −2 is above it, −3 is the greatest integer that does not exceed −2.5.

Can floor division have a negative remainder?

Yes. With a negative divisor, a nonzero floor remainder is negative. For 7.5 ÷ −3, the quotient is −3 and the remainder is −1.5.

Can I use decimals?

Yes. Both inputs may be decimal numbers, and the remainder may also be decimal. The divisor must be nonzero.

Is floor division the same as truncation?

They agree for nonnegative quotients and exact integer quotients. For a negative noninteger quotient, floor is one lower than truncation toward zero.

What happens when division is exact?

Floor keeps the integer quotient and the remainder is zero in exact arithmetic. For −9 ÷ 3, the quotient is −3 and remainder 0.

Why can 0.3 divided by 0.1 floor to 2 here?

Binary floating-point division can produce a value slightly below 3. Applying floor then gives 2. Use exact integer scaling or decimal arithmetic when exact decimal multiples matter.

How can I check the remainder?

Multiply the divisor by the floor quotient and add the remainder. The result should recover the dividend, allowing for the page’s display rounding and floating-point precision.

Sources and References