Purpose

Return value

Syntax

=CEILING(number,significance)
  • number - The number that should be rounded.
  • significance - The multiple to use when rounding.

Using the CEILING function

The Excel CEILING function rounds a number up to a given multiple. The multiple to use for rounding is provided as the significance argument. If the number is already an exact multiple, no rounding occurs and the original number is returned.

The CEILING function takes two arguments , number, and significance . Number is the numeric value to round up. The significance argument is the multiple to which number should be rounded. In most cases, significance is provided as a numeric value, but CEILING can also understand time entered as text like “0:15”. See the example below.

CEILING works like the MROUND function , which also rounds to a given multiple. However, unlike MROUND, which rounds to the nearest multiple, the CEILING function rounds up to the next multiple.

Note: the CEILING function is officially listed as a compatibility function , replaced by CEILING.MATH and CEILING.PRECISE .

Examples

The formulas below show how CEILING rounds up values to a given multiple:

=CEILING(10,3) // returns 12
=CEILING(36,7) // returns 42
=CEILING(309,25) // returns 325
=CEILING(610,100) // returns 700
=CEILING(-5.4,1) // returns -5

To round a number in A1 up to the nearest multiple of 5, you can use a formula like this:

=CEILING(A1,5)

Round pricing up to end with .99

CEILING can be useful to set pricing after currency conversion or discounts are applied. For example, the formula below will round a value in A1 up to the next whole dollar, then subtract 1 cent, to return a price like $2.99, $5.99, $49.99, etc.

=CEILING(A1,1) - 0.01

Round time up to nearest 15 minutes

CEILING understands time formats and can be used to round time up to a given multiple. For example, to round a time in A1 up to the nearest 15 minutes, you can use CEILING like this:

=CEILING(A1,"0:15") // round up to nearest 15 min

Other rounding functions

Excel provides a number of functions for rounding:

  • To round normally, use the ROUND function .
  • To round to the nearest multiple, use the MROUND function .
  • To round down to the nearest specified place , use the ROUNDDOWN function .
  • To round down to the nearest specified multiple , use the FLOOR function .
  • To round up to the nearest specified place , use the ROUNDUP function .
  • To round up to the nearest specified multiple , use the CEILING function .
  • To round down and return an integer only, use the INT function .
  • To truncate decimal places, use the TRUNC function .

Notes

  • CEILING works like the MROUND function , but CEILING always rounds up.
  • If number is an exact multiple of significance, no rounding occurs.
  • If number and significance are both negative, CEILING rounds down, away from zero .
  • If number is negative, and significance is positive, CEILING rounds up, towards zero .
  • For more control over how CEILING rounds negative numbers, see the CEILING.MATH function .

Purpose

Return value

Syntax

=CEILING.MATH(number,[significance],[mode])
  • number - The number that should be rounded.
  • significance - [optional] Multiple to use when rounding. Default is 1.
  • mode - [optional] Round negative numbers toward or away from zero. Default is 0.

Using the CEILING.MATH function

The Excel CEILING.MATH function rounds a number up to a given multiple, where multiple is provided as the significance argument. If the number is already an exact multiple, no rounding occurs and the original number is returned.

The CEILING.MATH function takes three arguments , number , significance, and mode . Number is the numeric value to round up, and is the only required argument. With no other input, CEILING.MATH will round number up to the next integer.

The significance argument is the multiple to which number should be rounded. In most cases, significance is provided as a numeric value, but CEILING.MATH can also understand time entered as text like “0:15”. The default value of significance is 1.

The mode argument controls the direction negative values are rounded. By default, CEILING.MATH rounds negative values up toward zero . Setting mode to 1 or TRUE changes behavior so that negative values are rounded away from zero . The default value of mode is 0 or FALSE, so you can think of mode as a setting that means “round away from zero”. Mode has no effect when number is positive.

Examples

By default, CEILING.MATH rounds to the nearest integer, using a significance of 1.

=CEILING.MATH(1.25) // returns 2

Provide a value for significance to round to a different multiple:

=CEILING.MATH(1.25,3) // returns 3
=CEILING.MATH(4.1,3) // returns 6
=CEILING.MATH(4.1,0.5) // returns 4.5

Rounding negative numbers

By default, positive numbers with decimal portions are rounded up to the nearest integer and negative numbers with decimal portions are rounded toward zero:

=CEILING.MATH(6.3) // returns 7
=CEILING.MATH(-6.3) // returns -6

Control for rounding negative numbers toward zero or away from zero is provided via the optional mode argument. Mode defaults to zero. When mode is zero, or omitted, CEILING.MATH rounds negative numbers toward zero. When mode is 1 or TRUE, CEILING.MATH rounds negative numbers away from zero. Mode has no effect on positive numbers.

=CEILING.MATH(-4.1) // returns -4
=CEILING.MATH(-4.1,1) // returns -4
=CEILING.MATH(-4.1,1,1) // returns -5
=CEILING.MATH(-4.1,1,TRUE) // returns -5

CEILING.MATH vs CEILING

The CEILING.MATH function together with the CEILING.PRECISE function replace the original CEILING function , which is now classified as a " compatibility function “. The behavior is very similar, but CEILING.MATH provides explicit control over how negative numbers are rounded. CEILING.MATH differs from CEILING in these key ways:

  1. Rounds up to the next integer by default (i.e. significance defaults to 1)
  2. Provides explicit control for rounding negative numbers (toward zero, away from zero)
  3. Changing the sign of significance has no effect on the result; use mode instead.

Notes

  • To round to the nearest multiple ( up or down) see the MROUND function .
  • CEILING.MATH works like CEILING , but provides control for rounding negative values.
  • The mode argument has no effect on positive numbers.
  • If number is an exact multiple of significance, no rounding occurs.

Explanation

This formula depends on the CEILING function , which rounds numbers up to a given multiple. It works because of how dates work in Excel’s default 1900 date system, where the first day is the number 1, which is Sunday, January 1, 1900.

In this scheme, the first Friday is day number 6, the second Friday is day number 13, and day 14 is the second Saturday. What this means is that all second Saturdays in the future are evenly divisible by 14.

The formula uses this fact to figure out 2nd Saturdays, then subtracts 1 to get the Friday previous.

The other Friday

If you need to get the alternate Friday in an every-other-Friday scheme, you can use this version of the formula:

=CEILING(A1+8,14)-8

The idea is the same, but the formula needs to roll forward 8 days to get to an even multiple of 14. Once CEILING returns a date, 8 days are subtracted to move back to the Friday previous.

Note: I ran into this formula as an answer on stack overflow by the awesome Barry Houdini.