One of the most popular methods of calculating the depreciation of an asset is the DecliningBalance Method, which reduces an asset's value by a fixed percentage during each period its useful lifetime.
Using this method, the depreciation during the first period of the asset's lifetime is greater than the depreciation during each successive period.
The Excel DB function calculates the depreciation of an asset, using the Fixed Declining Balance Method, for each period of the asset's lifetime.
The syntax of the function is:
where the arguments are:
cost    The initial cost of the asset. 
salvage    The value of the asset at the end of the depreciation. 
life    The number of periods over which the asset is to be depreciated. 
period    The period number for which we want to calculate the depreciation. 
[month]    An optional integer argument that specifies how many months of the year are used in the calculation of the first period of depreciation. The number of months in the last period of depreciation is then calculated as 12  [month]. If the [month] argument is omitted, it takes the default value of 12. 
In the spreadsheet below, the DB function is used to find the yearly depreciation of an asset that costs $10,000 at the start of year 1, and has a salvage value of $1,000 after 5 years.
Formulas:
 Results:

In the example below, the DB function is used with the same cost, salvage and life argument values as in Example 1 above. However, in the following example, the depreciation calculation starts 6 months into year 1.
Formulas:
 Results:

Note that, in the above example, the value at the end of year 1 has only depreciated over 6 months and the value at the end of year 2 has depreciated over 18 months, etc.
Further examples of the Excel DB function are provided on the Microsoft Office website.
If you get an error from the Excel DB Function, this is likely to be one of the following:
#NUM!    Occurs if either:

#VALUE!    Occurs if any of the supplied arguments are nonnumeric. 