DDB Function
The DDB function calculates double-declining depreciation for a specified period in the life of an asset that was purchased at cost and that has an estimated salvage value.
This function has the following syntax:
DDB(cost = value, salvage = value, life = value, period = value)
This function returns:
• Float—Double-declining balance depreciation for specified period
• Null—On error
Example—DDB function:
/* Compute the double declining balance depreciation
** for the third year in the life of an asset with an
** initial cost of $5,000, a life of five years, and
** a salvage value of $1,000.
*/
dep = ddb(cost = 5000, salvage = 1000, life = 5, period = 3);