Financial functions

SLN

Matches all 1,211 recorded answers

Recorded: 1,205 in the answer bank and 6 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicSLN
BulgarianSLN
CzechODPIS.LIN
DanishLA
GermanSLN
GreekSLN
English (Australia)SLN
English (United Kingdom)SLN
English (United States)SLN
SpanishSLN
EstonianSLN
FinnishSTP
FrenchSLN
HebrewSLN
CroatianSLN
HungarianLCSA
IndonesianSLN
ItalianSLN
JapaneseSLN
KoreanSLN
LithuanianSLN
LatvianSLN
NorwegianSLN
DutchLIN.AFSCHR
PolishSLN
Portuguese (Brazil)SLN
Portuguese (Portugal)AMORT
RomanianSLN
RussianАПЛ
SlovakSLN
SlovenianSLN
Serbian (Latin)SLN
SwedishLINAVSKR
ThaiSLN
TurkishDA işlevi
UkrainianSLN
VietnameseSLN
Chinese (Simplified)SLN
Chinese (Hong Kong)SLN
Chinese (Traditional)SLN

Names from Microsoft's support site.

What it does

SLN(cost, salvage, life)

SLN(cost,salvage,life) returns one period’s straight-line depreciation: an equal share of the depreciable amount over the stated life.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

=SLN(1200,200,5) returns 200. The depreciable amount is 1000 and five equal periods divide it into shares of 200.

Quirks

Life is a count of periods, with the same time unit used for the requested allowance. There is no current-period argument and no accumulated balance. The current kernel admits either sign of cost and salvage and any nonzero life, including negative life; it returns #DIV/0! for exactly zero life. That arithmetic admission is broader than an ordinary asset-depreciation schedule.

The subtraction and division have different rounding steps. A subnormal difference is retained until division, while a final subnormal amount is published as positive zero. Nonfinite numeric inputs or a nonfinite result give #NUM! in this kernel; failed worksheet numeric conversion is handled outside it. Microsoft's opened page defines the arguments but does not enumerate these edge codes.

How to implement

  1. Validate finite numeric inputs. Reject life=0 with #DIV/0!; do not introduce a positive-life guard when reproducing the current route.
  2. Compute difference=cost-salvage with ordinary binary64 subtraction. Preserve a subnormal difference at this point.
  3. Compute result=R(difference/life) with the stored operation: round the quotient to a 64-bit significand, then store to binary64. A single ordinary binary64 divide is a different graph.
  4. If the result is nonfinite, return #NUM!. If its magnitude is below the minimum normal binary64 value, return positive zero. Otherwise publish it.

For 1200,200,5, the difference is exactly 1000 and the quotient exactly 200. Changing life to -5 makes this code return -200; it does not create a different depreciation method. Changing salvage changes the depreciable amount before the division.

The source attributes this quotient and final-flush route to retained Excel build-20430, compatibility-version-2 probes. Its input conversion and worksheet context are separate obligations; this recipe is not a published Handbook conformance suite.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

SLN · 3 lines · calc-func/src/catalogue/financial.rs on GitHub
21 sln_fn "SLN" (3, 3) [V "cost", V "salvage", V "life"] |s, a, sv| {
    out(s, dep::sln_kernel(num(s, a, 0)?, num(s, a, 1)?, num(s, a, 2)?))
}
sln_kernel · 18 lines · calc-func/src/ported/depreciation_family.rs on GitHub
pub fn sln_kernel(cost: f64, salvage: f64, life: f64) -> Result<f64, WorksheetErrorCode> {
    validate_finite(&[cost, salvage, life])?;
    if life == 0.0 {
        return Err(WorksheetErrorCode::Div0);
    }
    // SLN admits either sign and every nonzero life. The observed quotient is
    // rounded through the existing extended-precision division substrate.
    // Preserve subnormal differences until division: only the published result
    // is flushed to positive zero (Excel 16.0 build 20430, CV2, W111 probes).
    let result = crate::ported::excel_numeric::excel_x87_div(cost - salvage, life);
    if !result.is_finite() {
        Err(WorksheetErrorCode::Num)
    } else if result.abs() < f64::MIN_POSITIVE {
        Ok(0.0)
    } else {
        Ok(result)
    }
}

Kernels shared with other functions

Argument and result plumbing

  • num catalogue/kit
  • out catalogue/kit

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded8,852

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

8,852 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

SYD front-loads the allowance; DB and DDB use declining-balance methods.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents