Graph of y = ⌊x⌋ (Floor (greatest integer) function)

· How we calculate · Free, no sign-up

Quick answer

The graph of y = ⌊x⌋ is a staircase of horizontal steps one unit long, each with a closed dot on the left and an open dot on the right. Domain: All real numbers (−∞, ∞); range: All integers ℤ. x-intercept: Every x with 0 ≤ x < 1; y-intercept: y = 0. It is neither even nor odd.

Functiony = ⌊x⌋
DomainAll real numbers (−∞, ∞)
RangeAll integers ℤ
x-intercept(s)Every x with 0 ≤ x < 1
y-intercepty = 0
Derivative0 for non-integer x; undefined at integers
Graph of y = ⌊x⌋ for −4 ≤ x ≤ 4−4−3−2−101234−4−3−2−101234
Graph of y = ⌊x⌋ for −4 ≤ x ≤ 4, −4.5 ≤ y ≤ 4.5. Dots mark intercepts.
Zoom, pan and trace y = ⌊x⌋ in the interactive grapher.Open the Graphing Calculator →

What the graph of y = ⌊x⌋ looks like

⌊x⌋ (also written floor(x), int(x) or [x]) is the greatest integer less than or equal to x. Every number from 2 up to (but not including) 3 maps to 2, so the graph is a flight of steps: a closed dot at the left end of each step and an open dot at the right. Be careful with negatives — ⌊−1.5⌋ is −2, not −1.

The function jumps by 1 at each integer, so it is discontinuous there and its derivative is 0 everywhere else. Floor is used for rounding down, integer division and calendar calculations; its partner, the ceiling function ⌈x⌉, rounds up.

Key features of y = ⌊x⌋

Key features of y = ⌊x⌋
PropertyValue
Functiony = ⌊x⌋ (Floor (greatest integer) function)
FamilySpecial
DomainAll real numbers (−∞, ∞)
RangeAll integers ℤ
x-intercept(s)Every x with 0 ≤ x < 1
y-intercepty = 0
SymmetryNeither even nor odd
AsymptotesNone (jump discontinuities at every integer)
PeriodNot periodic (but ⌊x + 1⌋ = ⌊x⌋ + 1)
Increasing onNowhere strictly — non-decreasing overall, constant on each [n, n + 1)
Decreasing onNever
Key pointsJumps of 1 at every integer; ⌊−1.5⌋ = −2
Derivative f′(x)0 for non-integer x; undefined at integers
Antiderivative ∫ f(x) dx∫₀ˣ ⌊t⌋ dt = x⌊x⌋ − ⌊x⌋(⌊x⌋ + 1)/2

Symmetry: Neither even nor odd. For example f(0.5) = 0 but f(−0.5) = −1, which is neither the same value nor its negative. Intercepts: the graph meets the x-axis at Every x with 0 ≤ x < 1 and the y-axis at y = 0.

Table of values for y = ⌊x⌋

Values of y = ⌊x⌋
xy = ⌊x⌋Slope f′(x)
−2−2undefined
−1.5−20
−1−1undefined
−0.5−10
00undefined
0.500
11undefined
1.510
2.720
33undefined

How to sketch y = ⌊x⌋ by hand

Plot the points from the table — (−2, −2), (−1.5, −2), (−1, −1), (−0.5, −1), (0, 0), (0.5, 0) — on axes running from about −4 to 4 horizontally. There are no asymptotes to draw — jump discontinuities at every integer. Then join the points with a smooth curve on each step (use a closed dot where a step starts and an open dot where it ends). As a check on the shape — increasing: Nowhere strictly — non-decreasing overall, constant on each [n, n + 1); decreasing: Never.

Derivative, tangent line and area

The derivative of y = ⌊x⌋ is 0 for non-integer x; undefined at integers, which gives the slope of the curve at each point (the third column of the table). At x = 0.5 the curve is at height 0 and its slope is f′(0.5) = 0, so the tangent line there is y = 0.

The signed area under the curve from x = 0 to x = 3 is 3, found using the antiderivative ∫₀ˣ ⌊t⌋ dt = x⌊x⌋ − ⌊x⌋(⌊x⌋ + 1)/2.

Related graphs and transformations

Browse all graphs of common functions by family, or open the graphing calculator.

Frequently asked questions

What is the domain and range of y = ⌊x⌋?

Domain: All real numbers (−∞, ∞). Range: All integers ℤ.

What are the intercepts of y = ⌊x⌋?

x-intercept(s): Every x with 0 ≤ x < 1. y-intercept: y = 0.

What is the derivative of y = ⌊x⌋?

f′(x) = 0 for non-integer x; undefined at integers. At x = 0.5 the curve is at height 0 and its slope is f′(0.5) = 0, so the tangent line there is y = 0.

Is y = ⌊x⌋ even, odd or neither?

Neither even nor odd. For example f(0.5) = 0 but f(−0.5) = −1, which is neither the same value nor its negative.

Does y = ⌊x⌋ have asymptotes?

None (jump discontinuities at every integer).