Skip to main content

Floor & step functions

Greatest Integer Function Calculator

⌊x⌋ and y = a⌊b(x − h)⌋ + k with a four-step logic trace, stair graph, and worked examples. Floor / greatest integer function for algebra.

By Jeff Beem

Updated

⌊x⌋ means the greatest integer at or below x (same as the floor function, often written [x]). Enter y = a⌊b(x − h)⌋ + k to get a four-line trace and a stair graph; keep b ≠ 0 or the transform will not run.

Evaluate y = a⌊b(x − h)⌋ + k

⌊x⌋ only (at your x)

⌊2.5⌋ = 2

2 ≤ x < 3

Fractional part: 0.5

Result

y = 2⌊1(x − 1)⌋ + 3

y = 5

At x = 2.5, ⌊b(x−h)⌋ = 1

Domain
All real numbers (ℝ)
Range
{ y | y = 2m + 3, m ∈ ℤ }
Direction
Increasing (a·b > 0)
Zeros
No exact zeros unless k is a multiple of a (k = 3, a = 2)

Step graph

Each step: closed circle on the left, open on the right (standard ⌊x⌋ style).

0123451197531-1xy(x, y)

Logic trace

  • Step 1: x − h2.5 − (1) = 1.5
  • Step 2: b(x − h)1 × (1.5) = 1.5
  • Step 3: ⌊b(x − h)⌋⌊1.5⌋ = 1
  • Step 4: y = a·⌊…⌋ + k2 × (1) + (3) = 5

Worked example

  • ⌊15.99⌋ = 15 · ⌊−3.2⌋ = −4 (not −3)
  • y = 2⌊x − 1⌋ + 3 at x = 2.5: 2.5 − 1 = 1.5, ⌊1.5⌋ = 1, y = 5 (default inputs above)

Quick start

Type x plus a, b, h, k. Defaults match the worked example below (2⌊x − 1⌋ + 3 at x = 2.5). The trace shows the same four lines most teachers ask for on tests.

On the page

⌊x⌋ at your x

The small box under the inputs shows ⌊x⌋, the interval n ≤ x < n + 1, and the fractional part. That interval describes x itself, not the transformed stair shape.

When b is zero

Leave b at 0 and the transformed result stays blank. The stair graph and logic trace need b ≠ 0.

Logic trace order

x − h, then b(x − h), then the floor, then y = a·⌊…⌋ + k. Match your scratch work line for line.

Graph axes

The plot box shows x at step edges and y at each step level. The amber dot is your (x, y) on the active segment.

Greatest Integer Function Calculator: Floor, Steps & Graph

Evaluate ⌊x⌋ and y = a⌊b(x − h)⌋ + k with a step-by-step trace and a staircase graph. Worked examples, domain and range, and open vs closed endpoints.

What This Greatest Integer Function Calculator Does

You get two things at once. First, ⌊x⌋ at your chosen x, with the interval n ≤ x < n + 1 spelled out. Second, the transformed value y = a⌊b(x − h)⌋ + k with domain, range, direction (from the sign of ab), a plain-language zeros note, a four-line logic trace, and a stair graph with open and closed dots. It does not accept custom piecewise rules on random intervals, and it does not graph ceiling ⌈x⌉.

How the Math Works

The greatest integer (floor) of x is the largest integer n with n ≤ x.
  • Definition:
    x=max{nZ:nx}\lfloor x \rfloor = \max\{ n \in \mathbb{Z} : n \le x \}
  • Transform:
    Let u = b(x − h). Then y = a⌊u⌋ + k. Each integer m picks out a horizontal step where ⌊u⌋ = m, so y = am + k on that step.
  • Worked: ⌊15.99⌋
    15 ≤ 15.99 < 16, so the answer is 15.
  • Worked: ⌊−3.2⌋
    −4 ≤ −3.2 < −3, so the answer is −4 (not −3).
  • Worked: y = 2⌊x − 1⌋ + 3 at x = 2.5
    x − h = 1.5, b(x − h) = 1.5, ⌊1.5⌋ = 1, y = 2(1) + 3 = 5.
  • Direction:
    For a ≠ 0 and b ≠ 0, the graph rises as x increases when ab > 0 and falls when ab < 0. If a = 0, y = k (flat line). If b = 0, the transformed form is not used here.
  • Range:
    When a ≠ 0, outputs are exactly the values y = am + k as m runs through the integers.

How to Use This Calculator

Fill in x and the coefficients a, b, h, and k. The dark result card updates y and lists domain, range, increasing vs decreasing, and zeros. The left column also shows ⌊x⌋ at that same x (independent of a, b, h, k). Copy results grabs the numbers and trace text. The stair plot zooms to several step widths around your x (width scales with |1/b|), with labeled axes: x ticks at step boundaries, y ticks at step heights. See the worked example under the calculator for sample numbers.
  • a = 0:
    y = k everywhere the transform runs; the Direction row shows a dash because slope is not defined.
  • b = 0:
    No transform result, no graph, no trace until b is non-zero.

Greatest Integer Function Graph: Open vs Closed Endpoints

For y = ⌊x⌋, on each interval [n, n + 1) the output stays at n. The graph is flat on the left, jumps at the right, so the dot on the left is filled and the dot on the right is open. After you stretch or flip with a and b, the same idea applies to steps in x: with b > 0, closed on the left and open on the right; with b < 0, closed on the right and open on the left. The plot legend states which case you are viewing.

Floor Function vs Rounding Down a Decimal

⌊x⌋ is not the same as rounding x to the nearest integer. 3.7=3\lfloor 3.7 \rfloor = 3 but nearest-integer rounding gives 4. On negatives the gap is larger: 3.2=4\lfloor -3.2 \rfloor = -4 while nearest-integer rounding gives −3. This page only implements the floor / greatest-integer rule.

Greatest Integer Function Calculator FAQ

What is the greatest integer function?

It sends a real number x to the largest integer n with n ≤ x. You will see ⌊x⌋ or [x]. Same idea as the floor function: ⌊15.99⌋ = 15 and ⌊5⌋ = 5.

Why is ⌊−3.2⌋ equal to −4 and not −3?

−3 is bigger than −3.2, so it is not allowed. The integers that sit at or below −3.2 are −4, −5, and so on. The greatest one is −4. Positive decimals just drop the fraction; negatives always step down on the number line.

Is the greatest integer function the same as the floor function?

Yes for the way this page defines it (round down, never up). Some old [x] books draw endpoints differently at integers; here we follow ⌊x⌋ / Math.floor rules. To round one number with several rounding modes, use the Rounding Calculator Floor option.

What does y = a⌊b(x − h)⌋ + k mean?

a scales step height, b squeezes or flips steps sideways, h shifts the graph right, and k lifts it. Each jump happens when b(x − h) hits an integer. Set b = 0 and the tool stops: there is no step pattern in x.

Why are some dots on the graph filled and others hollow?

For b > 0, the left end of each horizontal step is filled and the right end is open, matching [n, n + 1) style intervals. For b < 0, the graph runs backward in x and the calculator swaps which end is closed.

How is this different from a piecewise step function calculator?

Piecewise tools let you type different rules on different intervals. This page is only for the floor family: ⌊x⌋ and y = a⌊b(x − h)⌋ + k, with a logic trace and a staircase picture.

Sources & citations

References used for the calculation method and definitions. Links open in a new tab when available.

[1]
Floor Function (MathWorld)

Standard definition of the floor / greatest integer function and ⌊x⌋ notation.

[2]
Floor and ceiling functions (Wikipedia)

Overview of floor ⌊x⌋ and ceiling ⌈x⌉, including endpoint conventions on the real line.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

© 2026 CalcRegistry Reference Last System Check: May 2026Free Online Utility Tools