Skip to content

Floor Function Calculator

Calculate floor(x), ceiling(x), truncation, fractional part, and the floor interval for integers, decimals, fractions, and percentages.

Last Updated: May 2026

floor(x)

7

ceiling(x)

8

trunc(x)

7

fractional part

41/50

Floor Function Input

Enter an integer, decimal, fraction, or percentage. Negative values use the standard floor rule, so floor(-2.4) is -3.

Accepted forms: 7.82, -2.4, 22/7, 62.5%.

Floor Identities

MeasureSetupValue
Input as fraction391/50Exact parsed value.
Input as decimal7.82Decimal approximation for review.
Floor interval7 <= x < 8The floor is the left endpoint of this interval.
Fractional part7.82 - 741/50
Distance to next integer8 - 7.829/50

Nearby Integers

IntegerRelation
5less than or equal to x
6less than or equal to x
7floor result
8greater than x
9greater than x

Math Notation Notice

This calculator uses the standard real-number floor function. In programming languages, names such as floor, trunc, integer part, and remainder can follow different conventions, especially for negative values.

Checked by Jitendra Kumar

Floor Function Calculator is checked for formula labels, source links, and result limits.

Jitendra Kumar, Founder & Editorial Standards Lead. Updated May 2026. Scope: math calculators.

Sources & methodology · Review standards

How to Use the Floor Function Calculator

Enter a value as an integer, decimal, fraction, or percentage. The calculator parses finite decimals and fractions exactly before evaluating floor(x).

Review the main floor result, then compare it with ceiling, truncation, fractional part, and the interval n <= x < n + 1.

  1. Step 1: Enter x

    Type a value such as 7.82, -2.4, 22/7, or 62.5%.

  2. Step 2: Read floor(x)

    The primary result shows the largest integer less than or equal to x.

  3. Step 3: Compare related values

    Use ceiling, truncation, and fractional part to understand the rounding behavior.

  4. Step 4: Check the interval

    Confirm that x lies in the interval from floor(x) up to the next integer.

How This Floor Function Calculator Works

The calculator converts the input to an exact rational number when possible. It then finds the largest integer that is less than or equal to that value.

For positive non-integers, floor(x) looks like dropping the decimal part. For negative non-integers, floor(x) moves to the next more-negative integer, which is why floor(-2.4) is -3.

The fractional part is computed as x - floor(x), so it stays in the interval from 0 up to but not including 1.

Floor Function Guide

Core Floor Function Rules

ConceptFormulaUse
Floor definitionfloor(x) = greatest integer <= xRounds down to the nearest integer at or below x.
Ceiling definitionceiling(x) = smallest integer >= xRounds up to the nearest integer at or above x.
Floor intervaln <= x < n + 1If x is in this interval, floor(x) = n.
Fractional part{x} = x - floor(x)Always satisfies 0 <= {x} < 1.
Integer shiftfloor(x + k) = floor(x) + kApplies when k is an integer.

Examples

InputResultWhy
floor(7.82)7Largest integer not greater than 7.82.
floor(-2.4)-3Floor moves down on the number line for negatives.
floor(22/7)322/7 is about 3.142857.
floor(62.5%)062.5% equals 0.625.
floor(-5)-5Exact integers are unchanged.

Floor Function Context

The floor function is a step function. Every real value from an integer n up to, but not including, n + 1 has the same floor value n.

Floor is common in number theory, discrete math, algorithms, indexing, binning, pagination, and formulas that convert continuous quantities into whole-number groups.

Keep the research moving with Integer Calculator, Modulo Calculator, Greater Than Or Less Than Calculator, and Scientific Calculator.

Frequently Asked Questions

The floor function returns the greatest integer less than or equal to the input value.

The floor of a negative non-integer moves down to the next lower integer. For example, floor(-2.4) is -3.

Only for positive values and exact integers. For negative non-integers, truncation moves toward zero while floor moves down.

The fractional part is x minus floor(x). It is always at least 0 and less than 1.

Yes. Enter fractions such as 22/7 or -17/5 and the calculator evaluates the floor exactly.

Related Calculators

Related Guides

Sources & References

  1. 1.Wolfram MathWorld - Floor Function(Accessed May 2026)
  2. 2.Wolfram Documentation - Floor(Accessed May 2026)
  3. 3.Wolfram MathWorld - Ceiling Function(Accessed May 2026)