Skip to main content

SLN

Returns the straight-line depreciation of an asset for one period.

Syntax

expression.SLN(arg1, arg2, arg3);

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).

Returns

number

Example

Calculate the straight-line depreciation of an asset for one period.

// The SLN function returns depreciation based on initial cost, salvage value, and asset life.

// Get the depreciation amount and place it in cell A1.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.SLN(3500, 500, 5));