ddb Function
Calculates the accelerated depreciation of an asset.
real ddb(
real price,
real scrap,
real life,
int period)
The book value for a specific period is equal to the purchase price minus the accumulated depreciation for previous periods:
-
Book value for Period 1 = Price
-
Book value for Period 2 = Book value for Period 1 - depreciation for Period 1
-
Book value for Period n = Book value for Period (n-1) - depreciation for Period (n-1)
There are three variations for the calculation of depreciation:
If Period > Life:
-
Depreciation = 0
If (Book value for Period n) - ((Book value for Period n) * 2/Life) < residual value:
-
Depreciation = (Book value for period n) - Residual value
In all other cases:
Depreciation = (Book value for period n) * 2 / Life
The syd and sln functions also calculate the depreciation of an asset. syd and ddb permit higher depreciation for the earlier years while sln calculates a linear depreciation.