What Is the Greatest Integer Function?
The greatest integer function takes a real number $x$ and returns the greatest integer that is less than or equal to $x$. It is written $\lfloor x \rfloor$ (sometimes $[x]$ in older texts) and is also called the floor function or the step function.
$$\lfloor x \rfloor = n, \quad \text{where } n \text{ is an integer and } n \leq x < n + 1.$$
In plain terms: slide left along the number line from $x$ until you hit the first integer, and that integer is the answer. For a number that's already an integer, the floor is itself. The key word is down — never round to the nearest integer, always round down.
How Do You Solve the Greatest Integer Function?
The fastest method is the number-line picture: mark $x$, then take the first integer at or to its left.
$\lfloor 4.7 \rfloor = 4$ — slide left from $4.7$, hit $4$.
$\lfloor 9 \rfloor = 9$ — already an integer.
$\lfloor 0.3 \rfloor = 0$.
For positive numbers this matches "chop off the decimal." For negative numbers it does not — and that's the catch the next section settles.
Why is the floor of a negative number not what most people expect?
Because "less than or equal to" points the other way for negatives. Take $\lfloor -2.4 \rfloor$. Chopping the decimal would give $-2$, but $-2$ is greater than $-2.4$, so it can't be the floor. The greatest integer $\leq -2.4$ is $-3$. The rule: for a negative non-integer, the floor goes to the more negative integer.
$$\lfloor -2.4 \rfloor = -3, \qquad \lfloor -0.1 \rfloor = -1, \qquad \lfloor -5 \rfloor = -5.$$
What Does the Graph of the Greatest Integer Function Look Like?
The graph is a staircase — flat horizontal steps that jump up by one at each integer. Over the interval $[n, n+1)$ the function holds steady at height $n$, then jumps. Each step carries a solid dot on its left end (the integer is included, since $\lfloor n \rfloor = n$) and an open dot on its right end (the next integer belongs to the next step, not this one).
That dot convention is the whole graph in miniature: solid means "this value is included," open means "approached but not reached." Over $[2, 3)$, the output is $2$ — including $x = 2$ itself but stopping just short of $3$, where the step jumps to height $3$.
What Are the Domain and Range of the Greatest Integer Function?
You can feed in any real number, so the domain is all real numbers, $\mathbb{R}$. But the output is always a whole number, so the range is the set of all integers, $\mathbb{Z}$.
That mismatch — continuous input, integer-only output — is what makes it a step function and why the graph can't be a smooth curve. It also means the function is not continuous: it jumps at every integer, breaking the curve into disconnected steps.
What Are the Properties of the Greatest Integer Function?
A short, clean list, each one worth knowing because it lets you simplify floor expressions without re-deriving them.
Integer shift: $\lfloor x + n \rfloor = \lfloor x \rfloor + n$ for any integer $n$. Pulling a whole number out of the floor is free.
Bounds: $\lfloor x \rfloor \leq x < \lfloor x \rfloor + 1$ always — the defining inequality.
Integer inputs: $\lfloor n \rfloor = n$ when $n$ is already an integer.
Negatives: $\lfloor -x \rfloor = -\lceil x \rceil$, linking the floor to its sibling the ceiling function (which rounds up).
Not one-to-one: every value in $[n, n+1)$ maps to the same output $n$, so many inputs share one output — far from a one to one function.
Examples of Greatest Integer Function
The examples build from a plain evaluation, through the negative-number trap, to solving a floor equation and a real-world billing problem.
Example 1
Evaluate $\lfloor 7.92 \rfloor$.
Slide left from $7.92$ to the first integer: $7$.
Final answer: $\lfloor 7.92 \rfloor = 7$.
Example 2
A common slip — evaluate $\lfloor -3.6 \rfloor$.
Wrong attempt. A student treats the floor like "chop the decimal" and writes $\lfloor -3.6 \rfloor = -3$. The decimal $.6$ disappears and $-3$ is left.
Test it against the definition. The floor must be less than or equal to $-3.6$. But $-3$ is bigger than $-3.6$ (it sits to the right on the number line), so $-3$ can't be the floor.
Correct. The greatest integer $\leq -3.6$ is $-4$.
$$\lfloor -3.6 \rfloor = -4.$$
Final answer: $\lfloor -3.6 \rfloor = -4$. For negatives, the floor moves away from zero, not toward it.
Example 3
Evaluate $\lfloor 5 \rfloor$ and $\lfloor -5 \rfloor$.
Both inputs are already integers, and the floor of an integer is itself.
Final answer: $\lfloor 5 \rfloor = 5$ and $\lfloor -5 \rfloor = -5$. The negative-number rule only bites when there's a fractional part.
Example 4
Solve $\lfloor x \rfloor = 3$.
The output is $3$ exactly when $x$ lands on the step of height $3$ — the interval $[3, 4)$.
$$3 \leq x < 4.$$
Final answer: $x \in [3, 4)$. Note it's a whole interval of solutions, not a single value, because every input on that step floors to $3$.
Example 5
Evaluate $\lfloor 2.5 \rfloor + \lfloor -2.5 \rfloor$.
$\lfloor 2.5 \rfloor = 2$. For the negative, the floor of $-2.5$ is $-3$ (the next integer down). So:
$$2 + (-3) = -1.$$
Final answer: $-1$. A common expectation is $0$ — but $\lfloor x \rfloor + \lfloor -x \rfloor$ equals $0$ only when $x$ is an integer; otherwise it's $-1$.
Example 6
A parking meter charges per started hour. A car parks for 2 hours 5 minutes (so $2.0833$ hours). How many hours is it billed?
Billing "per started hour" means the meter charges the next whole hour above the floor: $\lfloor 2.0833 \rfloor + 1 = 2 + 1 = 3$.
Final answer: 3 hours billed. The floor function isolates the completed hours; adding one charges for the hour in progress. This "round down, then bump" pattern is exactly how data plans, shipping tiers, and overage fees are computed.
Where the Greatest Integer Function Earns Its Place
"How many whole units have we completed so far?"
The floor and ceiling notation $\lfloor x \rfloor$ and $\lceil x \rceil$ was introduced by Kenneth E. Iverson (1920–2004, Canada) in 1962, while designing the programming language APL — he needed a clean, unambiguous symbol for rounding down that computers and mathematicians could share. The concept itself is far older, but the bracket notation everyone now uses is his.
Where it does real work:
Computing and programming. Integer division, array indexing, hashing, and pagination ("show items 1 to 10 of 47, across $\lceil 47/10 \rceil$ pages") all lean on floor and ceiling. Almost every "which bucket does this fall in?" computation is a floor.
Billing and tiered pricing. Parking, data overages, shipping weights, and interest periods round down to completed units, then charge the next. Example 6 is the everyday version.
Calendars and clocks. Converting total minutes to "hours and minutes" is $\lfloor \text{minutes}/60 \rfloor$ hours plus the remainder.
Where Students Trip Up on the Greatest Integer Function
Mistake 1: Treating the floor of a negative as "chop the decimal"
Where it slips in: Evaluating $\lfloor x \rfloor$ for a negative non-integer like $-2.4$ or $-3.6$.
Don't do this: Drop the decimal and keep the same integer part, writing $\lfloor -2.4 \rfloor = -2$.
The correct way: For a negative non-integer, go to the more negative integer: $\lfloor -2.4 \rfloor = -3$. The floor must be $\leq$ the number, and $-2$ is larger than $-2.4$.
Mistake 2: Putting the dots on the wrong ends of the graph steps
Where it slips in: Sketching the staircase graph and deciding which endpoint is solid.
Don't do this: Put the open dot on the left and the solid dot on the right of a step.
The correct way: Solid on the left, open on the right. The step over $[n, n+1)$ includes its left integer $n$ (so $\lfloor n \rfloor = n$, solid) and excludes $n+1$ (which jumps to the next step, open). The silent understander often draws it correctly by instinct but can't say why — anchoring on $\lfloor 2 \rfloor = 2$ (so $x=2$ must be on the height-2 step) makes the rule explicit.
Mistake 3: Assuming $\lfloor x \rfloor + \lfloor -x \rfloor = 0$
Where it slips in: Simplifying a sum of floors of opposite numbers.
Don't do this: Cancel them to $0$ by analogy with ordinary negatives.
The correct way: It's $0$ only when $x$ is an integer; for any non-integer, $\lfloor x \rfloor + \lfloor -x \rfloor = -1$ (Example 5). The asymmetry comes straight from the negative-number rule.
Key Takeaways
The greatest integer function $\lfloor x \rfloor$ returns the largest integer less than or equal to $x$ — it always rounds down.
For negative non-integers it moves to the more negative integer: $\lfloor -2.4 \rfloor = -3$, not $-2$.
The graph is a staircase with a solid dot on each step's left end and an open dot on its right; the domain is all reals, the range is all integers.
The most common mistake is treating the floor as "chop the decimal," which fails on negatives.
It powers integer division, tiered billing, pagination, and calendar arithmetic — anywhere you count completed whole units.
Practice These Before Moving On
Evaluate $\lfloor 8.99 \rfloor$ and $\lfloor -8.99 \rfloor$.
Solve $\lfloor x \rfloor = -2$.
Evaluate $\lfloor 3.5 \rfloor + \lfloor -3.5 \rfloor$.
Answer to Question 1: $\lfloor 8.99 \rfloor = 8$ and $\lfloor -8.99 \rfloor = -9$. Answer to Question 2: $x \in [-2, -1)$. Answer to Question 3: $3 + (-4) = -1$. If Question 1's negative came out as $-8$, return to Mistake 1 and point left on the number line.
Want a live Bhanzu trainer to walk through more greatest integer function problems? Book a free demo class — online globally.
Was this article helpful?
Your feedback helps us write better content