Skip to main content

SYD

Returns the sum-of-years' digits depreciation of an asset for a specified period.

Syntax

expression.SYD(arg1, arg2, arg3, arg4);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe initial cost of the asset.
arg2RequiredApiRange | ApiName | numberThe salvage value of the asset at the end of its lifetime.
arg3RequiredApiRange | ApiName | numberThe number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).
arg4RequiredApiRange | ApiName | numberThe period for which the depreciation will be calculated. It must use the same units as the useful life of the asset.

Returns

number

Example

This example shows how to return the sum-of-years' digits depreciation of an asset for a specified period.

// How to calculate the sum-of-years' digits depreciation.

// Use a function to estimate the sum-of-years' digits depreciation of an asset.

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.SYD(3500, 500, 5, 3));