How to calculate machine downtime

How to calculate machine downtime