
=MAX(value1,value2)
Related formulas
Smaller of two values
Cap percentage at specific amount
To get the larger, or greater, of two values, you can use the MAX function. In the example shown, the formula in D5 is:
=MAX(B5,C5)
The MAX function is fully automatic – it returns the largest value in the numbers provided. In this case, we give MAX function two values:
=MAX(B5,C5)
and MAX returns the larger value.
The MAX function can be a compact and elegant replacement for the IF function. For example, the formula above can be written with IF like so:
=IF(B5>=C5,B5,C5)
However, the MAX version is 6 characters shorter (11 vs. 17), and contains no redundant references, so it is less prone to errors.

=MAX(value1,value2)
Related formulas
Smaller of two values
Cap percentage at specific amount
To get the larger, or greater, of two values, you can use the MAX function. In the example shown, the formula in D5 is:
=MAX(B5,C5)
The MAX function is fully automatic – it returns the largest value in the numbers provided. In this case, we give MAX function two values:
=MAX(B5,C5)
and MAX returns the larger value.
The MAX function can be a compact and elegant replacement for the IF function. For example, the formula above can be written with IF like so:
=IF(B5>=C5,B5,C5)
However, the MAX version is 6 characters shorter (11 vs. 17), and contains no redundant references, so it is less prone to errors.