Depreciation can be calculated based on activity of an asset rather than time and this is appropriately called activity depreciation. This type of depreciation is most commonly used for cycle life of machinery and miles traveled for a vehicle.
Using a vehicle as an example it works like this. When the vehicle is purchased it’s life is estimated in terms of miles. So let’s assume a vehicle can be expected to travel 60,000 miles in its lifetime. The per mile depreciation rate is calculated based on the cost and scrap value of the vehicle. So if the vehicle costs $25,000 and has a scrap value of $7000 we would calculate ($25,000-$7000)/60,000 miles = $0.30 per mile. Depreciation is then taken against the asset by multiplying this rate by the actual miles driven.