Floor Function Calculator
Find the floor of any number: the greatest integer less than or equal to it, so 3.2 gives 3 and −3.2 gives −4. Works for decimals and negatives.
Floor Function Calculator
Background.
Rounding down sounds like the simplest operation in arithmetic until a negative number turns up. Ask for the whole number below 3.2 and everyone answers 3. Ask for the whole number below −3.2 and many people, and several programming languages' integer conversions, answer −3 — which is above −3.2, not below it. The floor function settles the matter: it is the greatest integer less than or equal to the number, so the floor of −3.2 is −4.
Written ⌊x⌋, a notation Kenneth Iverson introduced in 1962 together with the ceiling ⌈x⌉, the floor turns up wherever only complete units count. Age in years is the floor of the time since birth. The full hours in 135 minutes number ⌊135/60⌋ = 2. The multiples of 7 up to 100 number ⌊100/7⌋ = 14. Number theory leans on it as well: the zeros at the end of 100 factorial number ⌊100/5⌋ + ⌊100/25⌋ = 24, one for every factor of 5 that pairs with a factor of 2.
The floor also splits any real number into two pieces. Subtract it from the original and what is left is the fractional part, always at least 0 and less than 1 — 0.2 for 3.2, but 0.8 for −3.2, because −3.2 = −4 + 0.8. That asymmetry is exactly what makes floor consistent: the integer piece always sits to the left on the number line and the leftover is always positive.
Enter one real number between minus and plus one billion and the page returns its floor as an integer.
What is floor function calculator?
The floor of a real number x, written ⌊x⌋ or floor(x), is the largest integer n with n ≤ x. Equivalently, it is the one integer satisfying ⌊x⌋ ≤ x < ⌊x⌋ + 1. For a positive number it drops whatever follows the decimal point; for a negative non-integer it moves one step further from zero; for an integer it returns the number unchanged. Plotted, it is a staircase: flat across each interval from n up to just below n + 1, then jumping up by one at the next integer.
How to use this calculator.
- Type the number in the Real value field. Decimals and negative numbers are fine anywhere from −1,000,000,000 to 1,000,000,000.
- The field takes a single number, not an expression, so work out a fraction first: for 17/4, enter 4.25.
- If a division comes out to an exact whole number, enter that whole number rather than a rounded decimal — 21/7 is 3, and a typed 2.9999 would floor to 2.
- Read the floor. For a negative input that is not a whole number, the answer is one below the digits in front of the decimal point; that is correct, not an error.
- For the ceiling of a number, enter its negative and flip the sign of the answer: the floor of −3.2 is −4, so the ceiling of 3.2 is 4.
The formula.
⌊x⌋ = max{ n ∈ ℤ : n ≤ x }, the greatest integer not exceeding x. The defining inequality ⌊x⌋ ≤ x < ⌊x⌋ + 1 is the most useful way to check an answer: the floor must sit at or below x, and the next integer up must sit above it. Several identities follow. Adding a whole number passes straight through, so ⌊x + n⌋ = ⌊x⌋ + n for any integer n. The ceiling is the mirror image, ⌈x⌉ = −⌊−x⌋. The fractional part is x − ⌊x⌋, which always lies in [0, 1). For positive numbers floor and truncation agree; for negative non-integers floor is truncation minus one. The answer changes only when x crosses an integer — every value from 3 up to, but not including, 4 has a floor of 3.
A worked example.
Start with 3.2. The integers at or below it are 3, 2, 1, 0, −1 and so on without end, and the greatest of them is 3, so the floor is 3. The fractional part is 3.2 − 3 = 0.2, and the defining check 3 ≤ 3.2 < 4 holds. Now flip the sign. The integers at or below −3.2 are −4, −5, −6 and onward; −3 is not among them, because −3 is greater than −3.2. So the floor of −3.2 is −4, and the fractional part is −3.2 − (−4) = 0.8. Chopping off the decimals instead would have given −3, which is why a truncating function and a floor function disagree for every negative number that is not already whole.
Frequently asked questions.
Why is the floor of −3.2 equal to −4 and not −3?
How is the floor different from rounding and truncating?
Which spreadsheet and programming functions compute the floor?
Where does the floor function come up in everyday counting?
Is the floor the same as the integer part of a number?
References& sources.
- [1]OpenStax, Rice University. College Algebra 2e, 2021. Algebra and function chapters. Retrieved 2026-08-06.
- [2]OpenStax, Rice University. Precalculus 2e, 2021. Trigonometry and analytic geometry chapters. Retrieved 2026-08-06.
- [3]NIST/SEMATECH. e-Handbook of Statistical Methods, 2012. Chapter 1.3 and Chapter 4. Retrieved 2026-08-06.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 3 cited below
- Method
- floor(x) is the greatest integer less than or equal to x
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled