gives the greatest integer less than or equal to x.


gives the greatest multiple of a less than or equal to x.


  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • Floor[x] can be entered in StandardForm and InputForm as x, lf rf, or \[LeftFloor]x \[RightFloor].
  • Floor[x] returns an integer when is any numeric quantity, whether or not it is an explicit number. »
  • For exact numeric quantities, Floor internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
  • Floor applies separately to real and imaginary parts of complex numbers.
  • Floor automatically threads over lists.


open allclose all

Basic Examples  (3)

Round down to the nearest integer:

Round down to the nearest multiple of 10:

Plot over a subset of the reals:

Scope  (24)

Numerical Evaluation  (6)

Evaluate numerically:

Complex number inputs:

Single-argument Floor always returns an exact result:

The two-argument form tracks the precision of the second argument:

Evaluate efficiently at high precision:

Floor threads elementwise over lists:

Floor can deal with realvalued intervals:

Specific Values  (6)

Values of Floor at fixed points:

Value at zero:

Value at Infinity:

Evaluate symbolically:

Manipulate Floor symbolically:

Find a value of x for which the TemplateBox[{x}, Floor]=2:

Visualization  (4)

Plot the Floor function:

Visualize the two-argument form:

Plot Floor in three dimensions:

Visualize Floor in the complex plane:

Function Properties  (4)

Floor is defined for all real and complex inputs:

Floor can produce infinitely large and small results:

TraditionalForm formatting:

Use lf and rf to enter a short notation for Floor:

Differentiation and Integration  (4)

First derivative with respect to x:

First derivative with respect to a:

Definite integrals of Floor:

Series expansion:

Applications  (3)

Find the millionth digit of 1/997 in base 10:

Properties & Relations  (11)

Convert Floor to Piecewise:

Denest Floor functions:

Get Floor from PowerExpand:

Reduce equations containing Floor:

Floor function in the complex plane:

Sum expressions involving Floor:

Floor can be represented as a DifferenceRoot:

The generating function for Floor:

The exponential generating function for Floor:

Possible Issues  (2)

Floor does not automatically resolve the value:

Guard digits can influence the result of Floor:

Neat Examples  (3)

Selfcounting sequence:

Convergence of the Fourier series of Floor:

Introduced in 1988
Updated in 1996