Floor 
Details
- 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. » - Floor[x] applies separately to real and imaginary parts of complex numbers.
- If a is not a positive real number, Floor[x,a] is defined by the formula Floor[x,a]a Floor[x/a]. »
- 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 automatically threads over lists. »
Examples
open all close allBasic Examples (4)
Round down to the nearest integer:
Floor[2.4]Floor[2.6]Round down to the nearest multiple of 10:
Floor[226, 10]Plot over a subset of the reals:
Plot[Floor[x, 10], {x, -30, 30}]Use
lf
and
rf
to enter a short notation for Floor:
⌊x⌋Scope (30)
Numerical Evaluation (7)
Floor[5.37]Floor[-3.7]Floor[-10.3, 3.5]Floor[2Pi - E, 5 / 4]Floor[5.37 - 1.3I]Single-argument Floor always returns an exact result:
Floor[123.4`45]The two-argument form tracks the precision of the second argument:
Floor[100`45, 13.2456`10]Evaluate efficiently at high precision:
Floor[7545 / 4660`10000]//TimingN[Floor[(E + Pi) ^ 2 - E ^ 2 - Pi ^ 2 - 2 E Pi], 10^5]//Quiet//TimingFloor can deal with real‐valued intervals:
Floor[Interval[{-1, 3 / 2}]]Compute average-case statistical intervals using Around:
Floor[ Around[-1, 0.01]]Compute the elementwise values of an array using automatic threading:
**Floor**[{{1 / 2, -1}, {0, -1 / 2}}]Or compute the matrix Floor function using MatrixFunction:
MatrixFunction[Floor, {{1 / 2, -1}, {0, -1 / 2}}]Specific Values (6)
Values of Floor at fixed points:
Table[Floor[n], {n, {1 / 7, 5 / 4, 7 / 3, 7 / 2}}]Floor[0]Value at Infinity:
Floor[∞]PiecewiseExpand[Floor[x, 2], 0 < x < 4]Manipulate Floor symbolically:
Simplify[Floor[x] + Floor[x + 1]]Reduce[Floor[x] + Floor[2x - 1] == 0, x, Reals]Find a value of x for which the
:
xval = x /. FindRoot[Floor[x] == 2, {x, 2.5}]Plot[Floor[x], {x, -1, 4}, Epilog -> Style[Point[{xval, Floor[xval]}], PointSize[Large], Red], ExclusionsStyle -> Dotted]Visualization (4)
Plot the Floor function:
Plot[Floor[x], {x, -3, 3}, Filling -> Axis]Visualize the two-argument form:
Plot[Floor[x, .5], {x, -3, 3}, Filling -> Axis]Plot Floor in three dimensions:
Plot3D[Floor[x, y], {x, -3, 3}, {y, -3, 3}, ColorFunction -> "BlueGreenYellow"]Visualize Floor in the complex plane:
ComplexPlot3D[Floor[z], {z, 3}, PlotLegends -> Automatic]Function Properties (9)
Floor is defined for all real and complex inputs:
FunctionDomain[Floor[x], x]FunctionDomain[Floor[x], x, Complexes]Floor can produce infinitely large and small results:
FunctionRange[Floor[x], x, y]//QuietFloor is not an analytic function:
FunctionAnalytic[Floor[x], x]It has both singularities and discontinuities:
FunctionSingularities[Floor[x], x]FunctionDiscontinuities[Floor[x], x]Floor is nondecreasing:
FunctionMonotonicity[Floor[x], x]Floor is not injective:
FunctionInjective[Floor[x, 5], x]Plot[{Floor[x, 5], 5}, {x, -20, 20}, PlotStyle -> {Thick}]Floor is not surjective:
FunctionSurjective[Floor[x, 5], x]Plot[{Floor[x, 5], -2}, {x, -20, 20}, PlotStyle -> {Thick}]Floor is neither non-negative nor non-positive:
FunctionSign[Floor[x], x]Floor is neither convex nor concave:
FunctionConvexity[Floor[x], x]TraditionalForm formatting:
Floor[x]//TraditionalFormDifferentiation and Integration (4)
First derivative with respect to x:
D[Floor[x], x]First derivative with respect to a:
D[Floor[x, a], a]//FullSimplifyDefinite integrals of Floor:
Integrate[Floor[x], {x, 0, E}]Integrate[Floor[x ^ 2], {x, 0, 3}]Series[Floor[x ^ 2], {x, 1, 2}, Assumptions -> Element[x, Reals]]Applications (4)
Plot the floor of a real function along the real axis:
Plot[Floor[x + x ^ 2], {x, -3, 3}]Plot the floor of a 2D function:
Plot3D[Floor[x y], {x, -2, 2}, {y, -2, 2}]Find the millionth digit of 1/997 in base 10:
Floor[10 Mod[PowerMod[10, 10 ^ 6 - 1, 997], 997] / 997]RealDigits[1 / 997, 10, 10 ^ 6, -1][[1, -1]]Expand multivalued functions, giving some assumptions about variables:
PowerExpand[Sqrt[z ^ 2], Assumptions -> {z∈Reals}]
PowerExpand[Log[1 / z], Assumptions -> {z > 0}]Then expand the same functions without making any assumptions about variables:
PowerExpand[Sqrt[z ^ 2], Assumptions -> {}]
PowerExpand[Log[1 / z], Assumptions -> {}]Properties & Relations (12)
Negative numbers round down to the nearest integer below:
Floor[{-2.4, -2.5, -2.6}]For a>0, Floor[x,a] gives the greatest multiple of a less than or equal to x:
Floor[16, 3]For other values of a, Floor[x,a] is defined by the following formula:
FunctionExpand[Floor[x, a]]For a<0, the result is greater than or equal to x:
{Floor[x, a], %} /. {x -> 16, a -> -3}Floor[x,-a] is equal to Ceiling[x,a]:
FullSimplify[Floor[x, -a] == Ceiling[x, a]]PiecewiseExpand[Floor[x ^ 2], 0 < x < 2]Denest Floor functions:
PiecewiseExpand[Floor[x + 1 / 3 + Floor[1 - x / 2] ^ 3], -1 < x < 1]Get Floor from PowerExpand:
PowerExpand[Sqrt[z ^ 2], Assumptions -> {}]PowerExpand[ArcSin[Sin[z]], Assumptions -> {}]Reduce equations containing Floor:
Reduce[Floor[x + 1 / 2] == 3Floor[x ^ 2] - 2 && -2 < x < 2, x, Reals]Floor function in the complex plane:
ContourPlot[Abs[Floor[x + I y]], {x, -3, 3}, {y, -3, 3}]Sum expressions involving Floor:
Sum[Floor[k / 3], {k, 1, n}, Assumptions -> n > 1]Sum[(k/Floor[k] + 1), {k, 1, n}]Floor can be represented as a DifferenceRoot:
DifferenceRootReduce[Floor[k], k]DifferenceRootReduce[Floor[k, 3], k]The generating function for Floor:
GeneratingFunction[Floor[n, 4], n, x]Series[%, {x, 0, 10}]The exponential generating function for Floor:
ExponentialGeneratingFunction[Floor[n, 4], n, x]Possible Issues (2)
Floor does not automatically resolve the value:
Floor[π ^ 2 + 2π + 1 - (π + 1) ^ 2]Simplify[%]Guard digits can influence the result of Floor:
Floor[1`100 - 10 ^ -130]Floor[1`100 + 10 ^ -130]1`100 - 10 ^ -130 === 1`100 + 10 ^ -130Neat Examples (3)
Table[Floor[Sqrt[2k] + 1 / 2], {k, 21}]Explore the continued fraction of a sum involving Floor:
Sum[1 / 2 ^ Floor[n / GoldenRatio], {n, 1, 10000}];Log[2, Take[ContinuedFraction[%], 15]]Table[Fibonacci[k], {k, -1, 13}]Convergence of the Fourier series of Floor:
Plot[Evaluate[Table[x + 1 / 2 - UnitStep[x] + Sum[Sin[2Pi k x] / k, {k, 1, o}] / Pi, {o, 10}]], {x, 0, 4}]See Also
Ceiling Round IntegerPart Chop Piecewise BinCounts Quantile FindDivisions
Function Repository: MinMaxRounded
History
Introduced in 1988 (1.0) | Updated in 1996 (3.0) ▪ 2007 (6.0)
Text
Wolfram Research (1988), Floor, Wolfram Language function, https://reference.wolfram.com/language/ref/Floor.html (updated 2007).
CMS
Wolfram Language. 1988. "Floor." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/Floor.html.
APA
Wolfram Language. (1988). Floor. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Floor.html
BibTeX
@misc{reference.wolfram_2026_floor, author="Wolfram Research", title="{Floor}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/Floor.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_floor, organization={Wolfram Research}, title={Floor}, year={2007}, url={https://reference.wolfram.com/language/ref/Floor.html}, note=[Accessed: 13-June-2026]}