This floor and ceiling calculator rounds a number down and up to whole numbers. The floor is the greatest integer that is less than or equal to the number, and the ceiling is the smallest integer that is greater than or equal to it. Enter a value and the calculator returns the floor, the ceiling, the nearest integer by ordinary rounding, and the fractional part. These functions are everywhere in programming, in working out how many containers or pages you need, and in mathematics. For negative numbers the floor moves away from zero and the ceiling towards it, which sometimes surprises people. The definitions, a worked example and the assumptions are set out below.
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.
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.
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.
The smallest integer greater than or equal to the number. The ceiling of 3.2 is 4.
For minus 2.5 the floor is minus 3 (further from zero) and the ceiling is minus 2 (towards zero).
This calculator is for students and anyone needing a quick, reliable result.
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.
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 via 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-06-21 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.