<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/ops/math_ops.py#L5704-L5729) |

Return the ceiling of the input, element-wise.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.ceil`](https://www.tensorflow.org/api_docs/python/tf/math/ceil)

<br />

    tf.math.ceil(
        x, name=None
    )

### Used in the notebooks

| Used in the tutorials |
|---|
| - [Scalable model compression](https://www.tensorflow.org/tutorials/optimization/compression) - [Preprocessing data with TensorFlow Transform](https://www.tensorflow.org/tfx/tutorials/transform/census) |

#### For example:

    tf.math.ceil([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0])
    <tf.Tensor: shape=(7,), dtype=float32,
    numpy=array([-1., -1., -0.,  1.,  2.,  2.,  2.], dtype=float32)>

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | A [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor). Must be one of the following types: `bfloat16`, `half`, `float32`, `float64`. `int32` |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor). Has the same type as `x`. ||

<br />

<br />

## numpy compatibility

<br />

Equivalent to np.ceil

<br />

<br />