Difference between revisions of "Documentation/How Tos/Calc: DB function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial content)
 
Line 13: Line 13:
  
 
: To calculate depreciation, <tt>'''DB'''</tt> uses a fixed rate throughout the asset’s life, given by
 
: To calculate depreciation, <tt>'''DB'''</tt> uses a fixed rate throughout the asset’s life, given by
:: rate = 1 - (salvagevalue/originalcost)<sup>(1/lifetime)</sup>
+
:: <tt>'''rate'''</tt> = 1 - (<tt>'''salvagevalue'''</tt>/<tt>'''originalcost'''</tt>)<sup>(1/<tt>'''lifetime'''</tt>)</sup>
 
: rounded to 3 decimal places.
 
: rounded to 3 decimal places.
  
 
: The depreciation in any year is given by
 
: The depreciation in any year is given by
:: value_at_start_of_year * rate
+
:: <tt>'''value_at_start_of_year * rate'''</tt>
  
: where value_at_start_of_year is originalcost - depreciation_so_far.
+
: where <tt>'''value_at_start_of_year'''</tt> = <tt>'''originalcost'''</tt> - <tt>'''depreciation_so_far'''</tt>.
  
: If months1styear is less than 12 the depreciation rate used for the first and last years is  
+
: If <tt>'''months1styear'''</tt> is less than 12 the depreciation rate used for the first and last years is  
:: rate * number_of_months_in_year / 12.
+
:: <tt>'''rate'''</tt> * <tt>'''number_of_months_in_year'''</tt> / 12.
  
 
=== Example: ===
 
=== Example: ===

Revision as of 15:57, 12 July 2008


DB

Returns the depreciation of an asset for a given year using the declining-balance method.

Syntax:

DB(originalcost; salvagevalue; lifetime; year; months1styear)

originalcost: the initial cost of the asset.
salvagevalue: is the value at the end of the depreciation (sometimes called the salvage value of the asset).
lifetime: the number of years over which the asset is being depreciated.
year: the year number for which the depreciation is calculated.
months1styear: the number of months in the first year (defaults to 12 if omitted).
To calculate depreciation, DB uses a fixed rate throughout the asset’s life, given by
rate = 1 - (salvagevalue/originalcost)(1/lifetime)
rounded to 3 decimal places.
The depreciation in any year is given by
value_at_start_of_year * rate
where value_at_start_of_year = originalcost - depreciation_so_far.
If months1styear is less than 12 the depreciation rate used for the first and last years is
rate * number_of_months_in_year / 12.

Example:

DB(10000; 1000; 5; 1)

returns approximately 3690 in currency units, which is the depreciation in the first year for an asset which cost 10000 and is written down to 1000 over 5 years.

See also:

DDB

Derivation of Financial Formulas

Financial functions

Issues:

  • This function underestimates depreciation slightly if months1styear is not 12; this is likely to be a standard approach with this method.
Personal tools