@travishorn/financejs
    Preparing search index...

    Function vdb

    • Calculates the depreciation of an asset for any period you specify, including partial periods, using the double-declining balance method or some other method you specify. VDB stands for variable declining balance.

      Parameters

      • cost: number

        The initial cost of the asset.

      • salvage: number

        The value at the end of the depreciation (sometimes called the salvage value of the asset). This value can be 0.

      • life: number

        The number of periods over which the asset is depreciated (sometimes called the useful life of the asset).

      • startPeriod: number

        The starting period for which you want to calculate the depreciation. startPeriod must use the same units as life.

      • endPeriod: number

        The ending period for which you want to calculate the depreciation. endPeriod must use the same units as life.

      • Optionalfactor: number = 2

        The rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method). Change factor if you do not want to use the double-declining balance method.

      • OptionalnoSwitch: boolean = false

        Whether to switch to straight-line depreciation when depreciation is greater than the declining balance calculation. If noSwitch is true, this function does not switch to straigh-line depreciation even when the depreciation is greater than the declining balance calculation. If noSwitch is false, this function switches to straight-line depreciation when depreciation is greater than the declining balance calculation.

      Returns number

      the depreciation

      vdb(2400, 300, 10 * 365, 0, 1); // 1.31506849