Export (0) Print
Expand All

Financial.DDB Method

Returns a Double specifying the depreciation of an asset for a specific time period using the double-declining balance method or some other method you specify.

Namespace:  Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public static double DDB(
	double Cost,
	double Salvage,
	double Life,
	double Period,
	double Factor
)

Parameters

Cost
Type: System.Double

Required. Double specifying initial cost of the asset.

Salvage
Type: System.Double

Required. Double specifying value of the asset at the end of its useful life.

Life
Type: System.Double

Required. Double specifying length of useful life of the asset.

Period
Type: System.Double

Required. Double specifying period for which asset depreciation is calculated.

Factor
Type: System.Double

Optional. Double specifying rate at which the balance declines. If omitted, 2 (double-declining method) is assumed.

Return Value

Type: System.Double
Returns a Double specifying the depreciation of an asset for a specific time period using the double-declining balance method or some other method you specify.

ExceptionCondition
ArgumentException

Factor <= 0, Salvage < 0, Period <= 0, or Period > Life.

The double-declining balance method computes depreciation at an accelerated rate. Depreciation is highest in the first period and decreases in successive periods.

The Life and Period arguments must be expressed in the same units. For example, if Life is given in months, Period must also be given in months. All arguments must be positive numbers.

The DDB function uses the following formula to calculate depreciation for a given period:

Depreciation / Period = ((Cost – Salvage) * Factor) / Life

This example uses the DDB function to return the depreciation of an asset for a specified period given the initial cost (InitCost), the salvage value at the end of the asset's useful life (SalvageVal), the total life of the asset in years (LifeTime), and the period in years for which the depreciation is calculated (Depr).

Dim InitCost, SalvageVal, LifeTime, DepYear As Double 
Dim Fmt As String = "###,##0.00"

InitCost = CDbl(InputBox("What's the initial cost of the asset?"))
SalvageVal = CDbl(InputBox("Enter the asset's value at end of its life."))
LifeTime = CDbl(InputBox("What's the asset's useful life in years?"))

' Use the SLN function to calculate the deprecation per year. 
Dim SlnDepr As Double = SLN(InitCost, SalvageVal, LifeTime)
Dim msg As String = "The depreciation per year: " & Format(SlnDepr, Fmt)
msg &= vbCrLf & "Year" & vbTab & "Linear" & vbTab & "Doubling" & vbCrLf

' Use the SYD and DDB functions to calculate the deprecation for each year. 
For DepYear = 1 To LifeTime
    msg &= DepYear & vbTab & 
        Format(SYD(InitCost, SalvageVal, LifeTime, DepYear), Fmt) & vbTab & 
        Format(DDB(InitCost, SalvageVal, LifeTime, DepYear), Fmt) & vbCrLf
Next
MsgBox(msg)

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft