Calculation formula help!

I need a formula to say: 

calculate 5% of the gross value and display which ever figure is lower between 5% of 'gross value' and 'Total Outstanding' 

any help is much appreciated!