Greatest Integer Function — Graph, Domain, Examples

#Algebra
TL;DR
The greatest integer function, written ⌊x⌋\lfloor x \rfloor, returns the largest integer that is less than or equal to xx — so it rounds every number down to a whole number. This article covers its definition, the staircase graph, domain and range, key properties, the rule for negative numbers, and six worked examples.
MV
Madhukar VLast updated on June 10, 20268 min read

What Is the Greatest Integer Function?

The greatest integer function takes a real number xx and returns the greatest integer that is less than or equal to xx. It is written ⌊x⌋\lfloor x \rfloor (sometimes [x][x] in older texts) and is also called the floor function or the step function.

⌊x⌋=n,where n is an integer and n≤x<n+1.\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 xx 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 xx, then take the first integer at or to its left.

  • ⌊4.7⌋=4\lfloor 4.7 \rfloor = 4 — slide left from 4.74.7, hit 44.

  • ⌊9⌋=9\lfloor 9 \rfloor = 9 — already an integer.

  • ⌊0.3⌋=0\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 ⌊−2.4⌋\lfloor -2.4 \rfloor. Chopping the decimal would give −2-2, but −2-2 is greater than −2.4-2.4, so it can't be the floor. The greatest integer ≤−2.4\leq -2.4 is −3-3. The rule: for a negative non-integer, the floor goes to the more negative integer.

⌊−2.4⌋=−3,⌊−0.1⌋=−1,⌊−5⌋=−5.\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)[n, n+1) the function holds steady at height nn, then jumps. Each step carries a solid dot on its left end (the integer is included, since ⌊n⌋=n\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)[2, 3), the output is 22 — including x=2x = 2 itself but stopping just short of 33, where the step jumps to height 33.

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, R\mathbb{R}. But the output is always a whole number, so the range is the set of all integers, Z\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: ⌊x+n⌋=⌊x⌋+n\lfloor x + n \rfloor = \lfloor x \rfloor + n for any integer nn. Pulling a whole number out of the floor is free.

  • Bounds: ⌊x⌋≤x<⌊x⌋+1\lfloor x \rfloor \leq x < \lfloor x \rfloor + 1 always — the defining inequality.

  • Integer inputs: ⌊n⌋=n\lfloor n \rfloor = n when nn is already an integer.

  • Negatives: ⌊−x⌋=−⌈x⌉\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)[n, n+1) maps to the same output nn, 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 ⌊7.92⌋\lfloor 7.92 \rfloor.

Slide left from 7.927.92 to the first integer: 77.

Final answer: ⌊7.92⌋=7\lfloor 7.92 \rfloor = 7.

Example 2

A common slip — evaluate ⌊−3.6⌋\lfloor -3.6 \rfloor.

Wrong attempt. A student treats the floor like "chop the decimal" and writes ⌊−3.6⌋=−3\lfloor -3.6 \rfloor = -3. The decimal .6.6 disappears and −3-3 is left.

Test it against the definition. The floor must be less than or equal to −3.6-3.6. But −3-3 is bigger than −3.6-3.6 (it sits to the right on the number line), so −3-3 can't be the floor.

Correct. The greatest integer ≤−3.6\leq -3.6 is −4-4.

⌊−3.6⌋=−4.\lfloor -3.6 \rfloor = -4.

Final answer: ⌊−3.6⌋=−4\lfloor -3.6 \rfloor = -4. For negatives, the floor moves away from zero, not toward it.

Example 3

Evaluate ⌊5⌋\lfloor 5 \rfloor and ⌊−5⌋\lfloor -5 \rfloor.

Both inputs are already integers, and the floor of an integer is itself.

Final answer: ⌊5⌋=5\lfloor 5 \rfloor = 5 and ⌊−5⌋=−5\lfloor -5 \rfloor = -5. The negative-number rule only bites when there's a fractional part.

Example 4

Solve ⌊x⌋=3\lfloor x \rfloor = 3.

The output is 33 exactly when xx lands on the step of height 33 — the interval [3,4)[3, 4).

3≤x<4.3 \leq x < 4.

Final answer: x∈[3,4)x \in [3, 4). Note it's a whole interval of solutions, not a single value, because every input on that step floors to 33.

Example 5

Evaluate ⌊2.5⌋+⌊−2.5⌋\lfloor 2.5 \rfloor + \lfloor -2.5 \rfloor.

⌊2.5⌋=2\lfloor 2.5 \rfloor = 2. For the negative, the floor of −2.5-2.5 is −3-3 (the next integer down). So:

2+(−3)=−1.2 + (-3) = -1.

Final answer: −1-1. A common expectation is 00 — but ⌊x⌋+⌊−x⌋\lfloor x \rfloor + \lfloor -x \rfloor equals 00 only when xx is an integer; otherwise it's −1-1.

Example 6

A parking meter charges per started hour. A car parks for 2 hours 5 minutes (so 2.08332.0833 hours). How many hours is it billed?

Billing "per started hour" means the meter charges the next whole hour above the floor: ⌊2.0833⌋+1=2+1=3\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 ⌊x⌋\lfloor x \rfloor and ⌈x⌉\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 ⌈47/10⌉\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 ⌊minutes/60⌋\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 ⌊x⌋\lfloor x \rfloor for a negative non-integer like −2.4-2.4 or −3.6-3.6.

Don't do this: Drop the decimal and keep the same integer part, writing ⌊−2.4⌋=−2\lfloor -2.4 \rfloor = -2.

The correct way: For a negative non-integer, go to the more negative integer: ⌊−2.4⌋=−3\lfloor -2.4 \rfloor = -3. The floor must be ≤\leq the number, and −2-2 is larger than −2.4-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)[n, n+1) includes its left integer nn (so ⌊n⌋=n\lfloor n \rfloor = n, solid) and excludes n+1n+1 (which jumps to the next step, open). The silent understander often draws it correctly by instinct but can't say why — anchoring on ⌊2⌋=2\lfloor 2 \rfloor = 2 (so x=2x=2 must be on the height-2 step) makes the rule explicit.

Mistake 3: Assuming ⌊x⌋+⌊−x⌋=0\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 00 by analogy with ordinary negatives.

The correct way: It's 00 only when xx is an integer; for any non-integer, ⌊x⌋+⌊−x⌋=−1\lfloor x \rfloor + \lfloor -x \rfloor = -1 (Example 5). The asymmetry comes straight from the negative-number rule.

Key Takeaways

  • The greatest integer function ⌊x⌋\lfloor x \rfloor returns the largest integer less than or equal to xx — it always rounds down.

  • For negative non-integers it moves to the more negative integer: ⌊−2.4⌋=−3\lfloor -2.4 \rfloor = -3, not −2-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

  1. Evaluate ⌊8.99⌋\lfloor 8.99 \rfloor and ⌊−8.99⌋\lfloor -8.99 \rfloor.

  2. Solve ⌊x⌋=−2\lfloor x \rfloor = -2.

  3. Evaluate ⌊3.5⌋+⌊−3.5⌋\lfloor 3.5 \rfloor + \lfloor -3.5 \rfloor.

Answer to Question 1: ⌊8.99⌋=8\lfloor 8.99 \rfloor = 8 and ⌊−8.99⌋=−9\lfloor -8.99 \rfloor = -9. Answer to Question 2: x∈[−2,−1)x \in [-2, -1). Answer to Question 3: 3+(−4)=−13 + (-4) = -1. If Question 1's negative came out as −8-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

Frequently Asked Questions

Is the greatest integer function the same as the floor function?
Yes. "Greatest integer function," "floor function," and "step function" are three names for the same map ⌊x⌋\lfloor x \rfloor — the largest integer less than or equal to xx.
What is the greatest integer function of a negative decimal?
It rounds down to the more negative integer. For example, ⌊−1.2⌋=−2\lfloor -1.2 \rfloor = -2, not −1-1, because the floor must be less than or equal to the number.
What are the domain and range?
The domain is all real numbers; the range is all integers. You can input any number, but the output is always a whole number.
Why does the graph have open and solid dots?
Each step includes its left integer (solid dot) and excludes its right integer (open dot), because that right integer belongs to the next step up. We worked through this in the graph section.
Is the greatest integer function continuous?
No. It jumps by one at every integer, so the graph is broken into separate steps. It's continuous within each step but not across the jumps.
✍️ Written By
Madhukar V
Madhukar V
Math Columnist & Analyst
I see mathematics as more than just numbers and formulas—it is a way of thinking, questioning, and understanding the world around us. I work at the intersection of mathematics, EdTech, technology, and AI-powered learning, I enjoy exploring how mathematical ideas can be made simple, meaningful, and relatable. Through my articles, I aim to present mathematics with curiosity and a practical perspective, helping readers see the beauty and relevance behind every concept in a Bhanzu way.
LinkedIn
Related Articles
Book a FREE Demo ClassBook Now →