Math.Ceiling Method

Returns the smallest integer number that is greater than or equal to a value.

...Math.Ceiling (value)

Prerequisites

None

Parameters

value

A required expression that evaluates to any numerical data type, e.g. Integer, Single, Double.

Remarks

Returns the smallest integer number that is greater than or equal to the value. This is sometimes referred to as rounding towards positive infinity.

Examples

Dim bigger As Single
bigger = Math.Ceiling(10.9999) ' Sets bigger equal to 11
bigger = Math.Ceiling(11) ' Sets bigger equal to 11
bigger = Math.Ceiling(11.0001) ' Sets bigger equal to 12

See Also

Math Class