How to calculate time spent in closure of ticket.

How to calculate time spent in closure of ticket.

I want to created a dashboard in which i want to present the tickets with time. i.e how many tickets closed in 24hrs,48hrs and 72 hrs.

Please tell me.