Going Stellar

Home/Google Sheets reference

Google Sheets function · Math

CEILING in Google Sheets: syntax and examples

CEILING rounds a number up to the next multiple of the factor you give. Use it for price steps such as 0.05, for packs of a fixed size and for time slots.

Syntax

CEILING(value, [factor])

Arguments

ArgumentTypeRequiredWhat it does
valuenumberyesThe number to round up.
factornumbernoThe multiple to round up to. If omitted, it is 1.

Examples

The examples use this table, starting in A1:

Price
19.82
2.1
-2.5
12.3
=CEILING(A2, 0.05)

Result: 19.85

Rounds a price up to the next 5 cents.

Run in a Google Sheet (English US locale) on .

=CEILING(A3)

Result: 3

Without factor the multiple is 1, so 2.1 goes up to 3.

Run in a Google Sheet (English US locale) on .

=CEILING(23, 5)

Result: 25

The next multiple of 5 at or above 23.

Run in a Google Sheet (English US locale) on .

=CEILING(A4, 2)

Result: -2

A negative number with a positive factor moves toward zero: -2.5 becomes -2.

Run in a Google Sheet (English US locale) on .

=CEILING(A5, 0.5)

Result: 12.5

Rounds to the nearest half above: 12.3 becomes 12.5.

Run in a Google Sheet (English US locale) on .

Common errors

  • A positive value with a negative factor returns #NUM!. Keep the signs of value and factor consistent.
  • A factor of 0 returns 0 with no error, which can hide a missing input cell.
  • Negative values move toward zero when the factor is positive: CEILING(-2.5, 2) is -2, not -4.

Compared with Excel

In Excel the second argument is required. Google Sheets makes factor optional and defaults it to 1.

Sources

  1. CEILING (Docs Editors Help)

Markdown version · All functions