Formualizer Docs

CEILING.MATH

Rounds a number up to the nearest integer or multiple using CEILING.MATH rules.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=CEILING.MATH(number, [significance])

Arguments

ArgumentTypeRequiredDefault
numbernumberRequired—
significancenumberOptional—

Remarks

  • If significance is omitted (or passed as 0), the function uses 1.
  • significance is treated as a positive magnitude.
  • Negative numbers round toward positive infinity.

Differences from Excel

Formualizer accepts one or two arguments. Supplying Excel's third argument, mode, returns #VALUE!.

Examples

Round a fractional number to a multiple of two.

Formula =CEILING.MATH(7.2,2)

Expected result 8

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Compare how the default mode rounds negative numbers.

Formula =CEILING.MATH(-7.2,2)

Expected result -6

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A number already at a multiple of the significance stays at that multiple.

Formula =CEILING.MATH(8,2)

Expected result 8

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The number argument cannot be read from this text.

Formula =CEILING.MATH("invalid",2)

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Default behavior for a positive number

Formula =CEILING.MATH(24.3,5)

Expected result 25

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Round a negative number to a multiple of five

Formula =CEILING.MATH(-24.3,5)

Expected result -20

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

How are negative numbers rounded?

With the supported arguments, negative numbers round toward positive infinity.

Implementation

Engine source

On this page