Enterprise value, how to calculate it ?

Market cap is calculated by using the following formula:

Enterprise value = (Market Cap) - (Cash on hand + Debt)