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.

How to Use This Calculator

  1. Enter the dividend in Divide. This is the number being split.
  2. Enter a nonzero divisor in By. Decimal and negative values are accepted.
  3. Select Calculate. The quotient is found first, then rounded down with the floor function.
  4. The remainder is calculated from dividend − divisor × floor quotient, so the displayed pair reconstructs the dividend.

“Down” refers to the number line, not merely to fewer decimal places. With −7.5 ÷ 3, the unrounded quotient is −2.5 and the floor quotient is −3. The corresponding remainder is 1.5 because −7.5 = 3(−3) + 1.5.

Formula Used

q = ⌊a ÷ b⌋

r = a − bq

The brackets ⌊ ⌋ mean the greatest integer less than or equal to the enclosed value. The divisor b must not equal zero. With a positive divisor, the remainder lies from zero up to, but not including, b.

Variables Explained

Inputs used in the calculation
Symbol or inputMeaningPractical note
a — DivideThe dividend, or value to be divided.It may be positive, negative, zero, or decimal.
b — ByThe divisor that sets the interval or group size.It must be nonzero; its sign affects quotient and remainder.
qThe integer floor quotient.It is always rounded toward negative infinity.
rThe remainder left after bq is removed from a.Check the answer by confirming a = bq + r.

Worked Example

Suppose a repeating three-day cycle is indexed from day −7.5 relative to a reference point. Enter −7.5 and 3:

  1. Ordinary quotient: −7.5 ÷ 3 = −2.5.
  2. Floor the quotient: ⌊−2.5⌋ = −3.
  3. Remainder: −7.5 − 3(−3) = 1.5.

The calculator therefore reports a floor quotient of −3 and a remainder of 1.5. Verification gives 3(−3) + 1.5 = −7.5.

Why Use This Calculator?

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.

Common Mistakes

  • Truncating a negative quotient: truncation sends −2.5 to −2, while floor division sends it to −3.
  • Using zero as the divisor: division by zero is undefined.
  • Applying the percent remainder operator by hand: languages differ in their treatment of negative operands. Use r = a − bq with the stated floor quotient.
  • Rounding inputs first: a value close to an integer boundary can move to another quotient.
  • Ignoring units: group counts require a dividend and divisor expressed on compatible scales.

Frequently Asked Questions

Is floor division the same as rounding down?

It is rounding down after division, where down means toward negative infinity. That distinction matters below zero: floor(−2.1) is −3, while truncating the decimal gives −2.

Why is the remainder positive for a negative dividend?

With a positive divisor, the floor convention chooses q so that 0 ≤ r < b. For −7 ÷ 3, q = −3 and r = 2 because −7 = 3(−3) + 2.

Can I enter decimal values?

Yes. The quotient is still an integer floor, while the remainder may be decimal. Avoid rounding the entries before calculating when they came from measurements.

What happens when the divisor is negative?

The reconstruction equation remains valid, but the remainder follows the divisor’s sign convention and may be negative. Check a = bq + r to interpret the pair.

How do I verify the result?

Multiply the floor quotient by the divisor and add the remainder. The total should reproduce the dividend apart from harmless display rounding.

Where is floor division useful?

Common uses include assigning indexes to fixed-size blocks, locating periods before and after a reference point, wrapping coordinates, and implementing algorithms that need a consistent rule for negative values.

Sources & References