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

</div>

Method

# Xojo.Math.Max

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

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Max</api/math/max>` as a replacement.

</div>

## Description

Returns the maximum value out of all the values passed in as parameters.

## Sample code

Calculates the maximum of multiple values:

``` xojo
Using Xojo.Math

Dim d As Double
d = Max(3.01, 4.05) ' d = 4.05

d = Max(3.012, 3.011, 1.56) ' d = 3.012

Dim i As Integer
i = Max(4, 8, 1, 9, 13, 11, 4) ' i = 13
```

## Compatibility

All project types on all supported operating systems.
