Math and trigonometry functions

CEILING

Known larger differences on 12 of 1,672 recorded answers

Of 1,672 recorded answers (1,335 in the answer bank and 337 workbook cells), 12 do not match: 2 differ by more than 16 ULP, 10 are refused. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicCEILING
BulgarianCEILING
CzechZAOKR.NAHORU
DanishAFRUND.LOFT
GermanCEILING
GreekCEILING
English (Australia)CEILING
English (United Kingdom)CEILING
English (United States)CEILING
SpanishMULTIPLO.SUPERIOR
EstonianCEILING
FinnishPYÖRISTÄ.KERR.YLÖS
FrenchPLAFOND
HebrewCEILING
CroatianCEILING
HungarianPLAFON
IndonesianCEILING
ItalianARROTONDA.ECCESSO
JapaneseCEILING
KoreanCEILING
LithuanianCEILING
LatvianCEILING
NorwegianTAK
DutchCEILING
PolishZAOKR.W.GÓRĘ
Portuguese (Brazil)TETO
Portuguese (Portugal)ARRED.EXCESSO
RomanianCEILING
RussianCEILING
SlovakCEILING
SlovenianCEILING
Serbian (Latin)CEILING
SwedishRUNDA.UPP
ThaiCEILING
TurkishTAVANAYUVARLA işlevi
UkrainianCEILING
VietnameseCEILING
Chinese (Simplified)CEILING
Chinese (Hong Kong)CEILING
Chinese (Traditional)CEILING

Names from Microsoft's support site.

What it does

CEILING(number, significance)

CEILING(number,significance) chooses a multiple of a signed step. For positive inputs with positive significance it rounds outward. For negative inputs, positive significance moves toward zero and negative significance moves away from zero. Both arguments are required. Significance is a step size, such as three or 0.05, rather than a count of decimal places.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

=CEILING(-10.3,3) returns -9, while =CEILING(-10.3,-3) returns -12. The magnitude quotient is about 3.4333: selecting three or four steps gives the two directions.

=CEILING(31.2,3) returns 33. A positive input with negative significance, such as =CEILING(31.2,-3), gives #NUM! in the current route.

Quirks

The significance sign changes the negative-input direction; a positive number with negative significance gives #NUM!. The current wrapper returns zero if either operand is zero, before that sign guard. Nonnumeric arguments are documented as #VALUE!.

Near an integer, the current function counts from a fifteen-significant-digit quotient reading. It can therefore return a multiple below the original positive input. The cited source retains CEILING(1*(1+2^-48),1)=1, while CEILING(1*(1+2^-47),1)=2. These are recorded boundary controls, separate from the ordinary signed examples above.

Do not substitute ROUNDUP: CEILING chooses multiples, and its negative-input sign rule is different. Extreme quotient and result publication cases also belong to the scalar wrapper’s numerical policy.

How to implement

Let D mean one nearest/even binary64 rounding and R the stored 64-bit-significand operation.

  1. Coerce the two arguments in order. Return positive zero if either is zero; reject a positive number with negative significance.
  2. The current native wrapper first obtains R(number/significance) to check the arithmetic site. A nonfinite quotient eventually gives #NUM!; a zero quotient keeps its zero route. For a finite nonzero quotient, the shared reading helper recomputes q=D(number/significance).
  3. Round q to fifteen significant decimal digits, then convert that decimal reading back to nearest binary64. The source implements this as scientific formatting with one leading digit and fourteen fractional digits, followed by parsing.
  4. Take the mathematical ceiling of that stored reading and return R(significance*count). Keep the count as a floating integer or a sufficiently large integer; narrowing every possible count to a signed 64-bit integer introduces an unrelated limit. Normalize zero; the current number publisher rejects nonfinite results and refuses unsupported subnormal publication.

The decimal-reading step can be coded without a formatter. Decode the exact q, find e with 10^e<=abs(q)<10^(e+1), and let h=10^(e-14). Round abs(q)/h to the nearest integer, with an exact half choosing an even integer; restore sign, multiply by h exactly and store once to binary64. Use integer quotient/remainder comparisons as in the stored-arithmetic chapter. The Rust formatter’s nearest/even rule is documented publicly. This step acts on the binary64 quotient; ROUND’s preliminary input scaling is a different recipe.

For number=-10.3,significance=3, the quotient reading is about -3.43333333333333; its ceiling is -3, giving -9. A significance of -3 makes the quotient positive, its ceiling four, and the product -12.

The reading is a measured reconstruction on retained controls, not a recovery of private source. Underflow, extreme counts and whole-domain agreement still need separately scoped evidence.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

CEILING · 1 lines · calc-func/src/catalogue/rounding.rs on GitHub
call(CEILING, "CEILING", 2, SIGNIFICANCE, ceiling)
ceiling · 9 lines · calc-func/src/catalogue/rounding.rs on GitHub
/// CEILING: the number rounded up to a multiple of the significance; for a negative number and a
/// positive significance up is toward zero, and for both negative it is away from zero. A
/// positive number with a negative significance is #NUM!; a zero significance gives 0.
fn ceiling(
    arguments: &[CalcValue],
    services: &mut EvalServices<'_>,
) -> Result<CalcValue, FunctionFault> {
    ceiling_for(CEILING, arguments, services)
}

Kernels shared with other functions

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded1,335

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

1,335 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

MROUND chooses a nearest multiple; ROUNDUP and ROUNDDOWN address decimal positions. FLOOR.MATH provides the other directional family.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents