# Documentation/Calc Functions/CEILING.MATH

TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate

## Function name:

CEILING.MATH

## Category:

Mathematical

## Summary:

Rounds a number to the nearest multiple of a significance value.

For a positive number the function rounds up (away from zero). For a negative number, the direction of rounding is determined by the value of a mode parameter. The sign of the significance value is ignored.

## Syntax:

CEILING.MATH(**Number** [; **Significance** [; **Mode**]])

## Returns:

Returns an integer value.

## Arguments:

**Number** Number is the real number that is to be rounded, or a reference to a cell containing the number.

**Significance** (optional) is the real number value, or a reference to a cell containing the value, to whose multiple **Number** is to be rounded. It defaults to +1 or -1 depending on the sign of **Number**.

**Mode** (optional) is a number, or a reference to a cell containing a number. The function only uses **Mode** if both Number and Significance are negative. Then if **Mode** is given and not equal to zero, numbers are rounded down (away from zero). If **Mode** is equal to zero or not given, negative numbers are rounded up (towards zero).

## Additional details:

## Examples:

Formula | Description | Returns |
---|---|---|

=CEILING.MATH(11.5) | rounds up 11.5 to nearest multiple of +1(default) | 12 |

=CEILING.MATH(-11.5) | rounds up -11.5 to nearest multiple of -1(default) | -11 |

=CEILING.MATH(-11;-2) | rounds up -11 to nearest multiple of -2 | -10 |

=CEILING.MATH(-10;-3;1) | rounds down -10 to nearest multiple of -3 under mode 1 which is not 0 hence result will be away from 0 | -12 |

=CEILING.MATH(-11.67;-2;0) | rounds up -11.67 to nearest multiple of -2 under mode 0 i.e. towards 0 | -10 |

=CEILING.MATH(-11.67;-2;1) | rounds down -11.67 to nearest multiple of -2 under mode 1 which is not 0 hence result will be away from 0 | -12 |

=CEILING.MATH(11.5;-1) | rounds up 11.5 to nearest multiple of -1 but due to opposite sign this will return an error value | Err:502 |

## Related LibreOffice functions:

## ODF standard:

None

## Equivalent Excel functions:

CEILING.MATH