Investment Studio > Expressions > Functions > Financial > DB
float db(float initial_cost, float salvage_value, integer total_periods, integer period, integer months_in_first_year = 12)
Returns the depreciation of an asset for the specified period using the fixed-declining balance method.
initial_cost > 0 is the initial value of the depreciating asset.
salvage_value < initial_cost is the final value of the asset after depreciation.
total_periods >= 1 is the number of periods over which the asset depreciates (the asset's useful life).
period >= 1 is the number of the period for which the depreciation is to be returned.
months_in_first_year is the number of months left in the year when the asset starts depreciating. If omitted, it defaults to 12 (depreciation started on January 1).
Under the fixed-declining balance method, the remaining value is depreciated by the same factor for all periods, except for shorter initial and final periods, where the depreciation factor is reduced accordingly. The depreciation factor is given by
factor = 1 - (salvage_value / initial_cost) ^ (1 / total_periods)
rounded to three decimal places.
Example
Consider a new office computer with the following properties:
The entire annual depreciation series is given by
db(3000, 500, 3, 1, 8) = 900 (only 30% due to reduction of full 45% depreciation factor by 4 months / 12 months = 1 / 3 for short initial period)
db(3000, 500, 3, 2, 8) = 945 (full 45% depreciation)
db(3000, 500, 3, 3, 8) = 519.75 (full 45% depreciation)
db(3000, 500, 3, 4, 8) = 92.2875 (only 15% of remaining value due to reduction of full 45% depreciation factor by 8 months / 12 months = 2 / 3 for short final period)