What is the formula to calculate mechanical advantage?

The formula to calculate mechanical advantage is:

Mechanical Advantage = Output Force / Input Force

or

Mechanical Advantage = Distance of effort arm / Distance of resistance arm