OhMyCalc

Ceiling & Floor Calculator

Calculate ceil, floor, round, and truncate for any number. See all four rounding modes side by side.

How to Use the Ceiling & Floor Calculator

  1. Enter any real number.
  2. Click Calculate to see all rounding results.
  3. Compare ceil, floor, round, and truncate side by side.

Schnellreferenz

VonNach
2.3ceil 3, floor 2
−2.3ceil −2, floor −3
2.5ceil 3, round 3
−2.7trunc −2, floor −3
5.0all → 5

Anwendungsfälle

Formel

ceil(x) = smallest integer ≥ x. floor(x) = largest integer ≤ x. round(x) = nearest integer. trunc(x) = integer part.

Häufig gestellte Fragen

What is the difference between ceil and floor?
Ceil rounds up to the next integer; floor rounds down. ceil(2.3) = 3, floor(2.3) = 2.
What does trunc do?
Truncate removes the decimal part without rounding. trunc(−2.7) = −2, while floor(−2.7) = −3.
When are these used?
In programming, financial calculations, pagination, and discrete quantity computations.