The declining formula for depreciation:
S = P * (1 - r)n, where
P is the initial amount,
r is the rate in the time period
n is the amount of time period
S is the final value
Make sure that r and n are in the same time period, i.e. years, months, days etc.
Straight line depreciation is as follows:
S = Vo - Dn, where
S is value of asset after a number of time periods
Vo is the purcahse price of the asset
D is amount of depreciation per period
n is number of periods.