Learn · 4 min read
How to Graph Step Functions and the Greatest Integer Function
The short answer
To graph the greatest integer function on our graphing calculator, type floor(x) into an expression line. The floor function rounds each x down to the nearest integer, and the graph comes out as a staircase: flat steps that jump up by 1 at every integer.
What you will see is a series of horizontal segments — floor(2.7) = 2, floor(3) = 3, floor(3.2) = 3 — with a jump discontinuity at each whole number. That staircase shape is the signature of every step function.
Step functions show up wherever a quantity jumps at thresholds: postage rates by weight, tax brackets by income, grading cutoffs by score. The calculator treats them like any other function — type floor(x) and you get the staircase — which makes it easy to model these situations and read values off the steps.
What the greatest integer function does
The greatest integer function, written ⌊x⌋ and also called the floor function, returns the largest integer less than or equal to x. So floor(4.9) = 4, floor(4) = 4, and — the tricky one — floor(−1.2) = −2, because −2 is the largest integer that is still less than or equal to −1.2.
Each output value holds across a whole interval: floor(x) = 2 for every x from 2 up to (but not including) 3. That is why the graph is flat between integers and jumps at the integers themselves — the function is constant on each interval [n, n + 1).
The negative side is where students get surprised, so test it in the table: floor(−0.3) = −1, not 0. Rounding down means toward negative infinity, not toward zero. The staircase keeps its shape, but the labels shift: the step at height −1 spans [−1, 0), just as the step at height 2 spans [2, 3).
Reading the staircase on the graph
Look closely at what the calculator draws at a jump, say at x = 2. The segment coming from the left sits at height 1, and the segment starting at x = 2 sits at height 2. There is a genuine gap between them — a jump discontinuity — which the calculator shows as a break in the staircase, not a slanted connector.
At the exact integer, the function takes the higher value: floor(2) = 2, since the interval [2, 3) includes its left endpoint. Each step therefore includes its left endpoint and excludes its right endpoint, a detail you can confirm in the table of values below.
Compare with ceil(x), the ceiling function, to sharpen the picture. Where floor jumps up at the integer, ceil has already jumped: ceil(2) = 2 but ceil(1.9) = 2 as well, so its steps sit one unit higher on each open interval. Graphing floor(x) and ceil(x) together shows two staircases offset by exactly one — the visual difference between rounding down and rounding up.
Shifting and scaling the steps
The same transformations that move smooth graphs also move staircases. Typing floor(x) + 2 lifts every step up by 2, and floor(x - 3) shifts the whole staircase 3 units right. To make the steps narrower or wider, scale inside: floor(2*x) puts two jumps per unit, while floor(x/2) stretches each step to width 2.
You can also change the step height. floor(2*x)/2 produces steps of height 0.5 instead of 1 — the jumps still land at multiples of 0.5, just half as tall. Experiment by combining shifts and scales until you can predict the staircase before the calculator draws it.
Sliders make this exploration fast. Type floor(x - h) + k and the calculator turns h and k into draggable sliders — drag h and the staircase slides left and right; drag k and it climbs or descends. Watching the jumps move as you drag connects the algebra of transformations to the picture instantly.
Checking values with the table
At a jump, the graph alone cannot tell you which endpoint value the function actually takes — so open the table of values. A table for floor(x) shows 1.99 → 1, 2 → 2, 2.01 → 2, confirming that the jump at x = 2 lands on the higher value.
The table is also how you read one-sided behavior near a step: the values just left of the integer approach the lower step, while the integer itself and everything just right of it sit on the upper step. For piecewise-style questions about "what is f(2)?" versus "what does f approach near 2?", the graph plus the table give the complete answer.
One caution: never read a limit at a jump from the graph alone. As x approaches 2 from the left, floor(x) approaches 1; from the right, it approaches 2 — so the two-sided limit does not exist. The table shows this cleanly with rows at 1.99 and 2.01, while the graph shows the gap. Step functions are the classic example of why one-sided behavior matters.
Try it in the calculator
Type any of these into the graphing calculator to see the ideas above in action:
- floor(x)
- floor(2*x)/2
- ceil(x)
Key takeaways
- floor(x) is the greatest integer function — type it directly; the graph is a staircase.
- Each step spans [n, n + 1): it includes the left endpoint, excludes the right.
- The jumps at integers are discontinuities — the calculator draws breaks, not connectors.
- floor(x) + 2 shifts up, floor(x - 3) shifts right, floor(2*x) narrows the steps.
- Use the table of values to confirm which value the function takes exactly at a jump.
Frequently asked questions
What is the difference between floor(x) and ceil(x)?
floor(x) rounds down to the nearest integer (floor(2.7) = 2), while ceil(x) rounds up (ceil(2.1) = 3). On the graph, ceil's staircase is the mirror image: its steps sit one unit higher, since ceil(x) equals floor(x) + 1 for every non-integer x.
Why are there gaps in the graph instead of vertical lines connecting the steps?
Because the function genuinely has no values between the steps at the jump — the graph goes from height 1 just left of x = 2 to height 2 at x = 2, with nothing in between. Drawing the break honestly shows the jump discontinuity; a connecting line would imply values that do not exist.
Can I graph a custom step function, like a shipping-cost schedule?
Yes, using the parametric workaround for piecewise functions: graph one parametric expression per flat piece (x = t, y = <price>, with the t-range set to that piece's interval). Each piece draws its own horizontal segment, building the schedule step by step.