Floor and Ceiling Calculator

This floor and ceiling calculator works out the floor, the ceiling, the nearest whole number and the fractional part for any number you enter. The floor is the greatest whole number that is less than or equal to your number, and the ceiling is the smallest whole number that is greater than or equal to it, so for 3.7 the floor is 3 and the ceiling is 4. You enter a single value into the number field, using a minus sign for negative numbers, and the results update instantly as you type. The result shows the floor and ceiling together, plus the nearest integer from ordinary rounding and the fractional part, which is your number minus its floor. These functions come up constantly outside pure maths: programmers use them to size arrays and handle pagination, tradespeople use ceiling values to round material quantities up so they never run short, and students use them to check working on greatest integer function problems. Negative numbers are where the two functions most often surprise people, because the floor moves further away from zero while the ceiling moves towards it, so minus 3.7 has a floor of minus 4 but a ceiling of minus 3. Enter the default value of 3.7 to confirm the worked example, then try a negative number to see the results flip.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
floor = 3, ceiling = 4
Nearest integer (round)4
Fractional part0.7

The formula

The floor of x, written with the down brackets, is the largest integer not greater than x. The ceiling of x, the up brackets, is the smallest integer not less than x. The fractional part is x minus the floor of x.

Worked example

For 3.7 the floor is 3 and the ceiling is 4, the nearest integer is 4, and the fractional part is 0.7. For minus 3.7 the floor is minus 4 and the ceiling is minus 3. Enter 3.7 to confirm.

Frequently asked questions

What is the floor of a number?

The greatest integer that is less than or equal to it. The floor of 3.7 is 3, and the floor of minus 3.7 is minus 4.

What is the ceiling?

The smallest integer greater than or equal to the number. The ceiling of 3.2 is 4.

How do they behave for negatives?

For minus 2.5 the floor is minus 3 (further from zero) and the ceiling is minus 2 (towards zero).

Who this calculator is for

This calculator is for students and anyone needing a quick, reliable result.

What this calculator assumes

  • You enter valid numbers.
  • The standard formula is applied.
  • Results are rounded for display.

Formula and sources

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland by SiteHost New Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-08-10 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.