<div class="meta" robots="noindex">

</div>

Method

# Ceil

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r1. Please use `Ceiling</api/math/ceiling>` as a replacement.

</div>

## Description

## Usage

*result* = **Ceil**(*value*)

| Part   | Description                        |
|--------|------------------------------------|
| result | The ceiling of *value*.            |
| value  | The value you want the ceiling of. |

## Notes

The result of this function is a `Double</api/data_types/double>`, but it will always contain a whole number.

## Sample code

This code uses the <span class="title-ref">Ceil</span> function to return ceiling of a number.

``` xojo
Var d As Double
d = Ceil(1.234) ' returns 2
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Because <span class="title-ref">Ceil</span> will always return a whole number, to round a decimal value to a certain number of places, you must first multiple the number by 10^(the number of decimal places to which you wish to round) then take the value returned by <span class="title-ref">Ceil</span> of that number and divide it by 10^(the number of decimal places to which you wish to round). In this code, the value 1.2345 is being rounded to two decimal places:

``` xojo
Var d As Double
d = Ceil(1.234 * 100) / 100
```

## Compatibility

All project types on all supported operating systems.

## See also

`Ceiling</api/math/ceiling>`, `Floor</api/math/floor>`, `Round</api/math/round>` functions.
