Documentation/Calc Functions/DB

Function name:
DB

Category:
Financial Analysis

Summary:
Calculates the depreciation of an asset for a given period using the fixed rate declining-balance method. This method calculates the depreciation based on the current book value of the asset (rather than its original cost) and this decreases from one period to the next. This leads to the depreciation being greater in earlier periods and less in later periods.

Syntax:
DB(Cost; Salvage; Life; Period[; Month])

Returns:
Returns a non-negative real number which is the depreciation of an asset for a specified period using the fixed rate declining-balance method. The number is in the same currency units as the Cost and Salvage values.

Arguments:
Cost is a positive real number or a reference to the cell containing that number which is the initial cost of an asset.

Salvage is a non-negative real number or a reference to the cell containing that number which is the value of an asset at the end of the depreciation. Salvage and Cost should be in the same currency units.

Life is a positive real number or a reference to the cell containing that number which defines the number of years over which an asset is depreciated.

Period is a non-negative real number or a reference to the cell containing that number which represents the year for which the depreciation is to be calculated. The function uses its truncated value if it is entered as non integer. There are two exceptions:
 * if Period is greater than 0 and less than 1, then the function returns 0;
 * if Period is greater than Life and less than Life plus 1, then the function considers it equal to Life plus 1.

Month is a positive number in the range from 1 to 12 or a reference to the cell containing that number which denotes the number of months for the first year of depreciation. The function uses its truncated value if it is entered as non integer. If an entry is not defined, 12 is used as the default.

The function reports an invalid argument error (Err:502) if:


 * after truncation Month is not an integer in the range from 1 to 12;
 * Cost is less than or equal to 0;
 * Life is less than Period plus 1;
 * Life is greater than 1200, or Life is less than or equal to 0;
 * Period is less than or equal to 0;
 * Salvage is less than 0, or Salvage is greater than Cost.

If any argument is non-numeric then the function reports a #VALUE! error.

Additional details:
To calculate the depreciation, DB uses a fixed rate throughout the asset’s life, given by $$ rate = 1- \left( \frac{Salvage}{Cost} \right)^{\frac{1}{Life}}. $$

The depreciation in any year (ranging from 1 to Period) is calculated as $$ value\_at\_start\_of\_year * rate, $$ where $$ value\_at\_start\_of\_year = Cost - depreciation\_so\_far. $$

If Month is less than 12, the depreciation rate used for the first year is $$ rate * \frac{Month}{12}. $$

If Period is equal to Life plus one, then the depreciation rate used for the last year is $$ rate * \frac{12-Month}{12}. $$

Related LibreOffice functions:
[[Special:MyLanguage/Documentation/Calc_Functions/DDB DDB]

[[Special:MyLanguage/Documentation/Calc_Functions/SLN SLN]

ODF standard:
Section 6.12.13, part 2

Equivalent Excel functions:
DB