{
  "category": "Financial functions",
  "display_name": "AMORLINC",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.AMORLINC",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 127 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 127 recorded answers",
    "workbook_corpus": {
      "cells": 127,
      "matched": 127
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/financial.rs#L310-L315",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/amor_depreciation_family.rs#L148-L159",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/amor_depreciation_family.rs#L189-L233"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/financial::date_1900",
        "catalogue/financial::amor_out",
        "locale::days_from_civil",
        "locale::civil_from_days",
        "locale::excel_serial_from_ymd",
        "locale::ymd_from_excel_serial",
        "ported/amor_depreciation_family::max_excel_serial",
        "ported/amor_depreciation_family::parse_basis",
        "ported/amor_depreciation_family::parse_date_serial",
        "ported/amor_depreciation_family::days_in_year",
        "ported/amor_depreciation_family::days_in_month",
        "ported/amor_depreciation_family::actual_days",
        "ported/amor_depreciation_family::days360_us",
        "ported/amor_depreciation_family::days360_eu",
        "ported/amor_depreciation_family::actual_actual_positive",
        "ported/amor_depreciation_family::first_period_fraction",
        "ported/amor_depreciation_family::map_amor_depreciation_error_to_ws"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/financial.rs#L310-L315",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 127 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.AMORLINC.json",
  "name": "AMORLINC",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n\n- **[AMORDEGRC](FUNC.AMORDEGRC.md)** — the accelerated sibling, with the same seven arguments,\n  the same proration and the same four-row basis table. Microsoft describes the difference in\n  one clause: `AMORDEGRC` applies \"a depreciation coefficient … depending on the life of the\n  assets\". Set that coefficient to 1 and remove the end-of-life 50/100 per cent steps and you\n  have this function.\n- **`SLN`** — the plain straight-line function. `SLN(cost, salvage, life)` is a flat\n  `(cost − salvage)/life`. `AMORLINC` differs on three axes at once: it charges `cost × rate`\n  rather than `(cost − salvage) × rate`, it prorates the first period by calendar date, and it\n  truncates the last charge at the depreciable basis instead of dividing it evenly.\n- **[DB](FUNC.DB.md)** — the other function in Excel that prorates a partial first year, but by\n  a `month` count rather than by a date pair, and on a declining rather than a linear balance.\n- **[DDB](FUNC.DDB.md)**, `VDB`, `SYD` — the rest of the depreciation category, all 1-based in\n  `period` and none of them date-aware.\n- **[YEARFRAC](FUNC.YEARFRAC.md)** — the standalone day-count engine that computes the same\n  first-period fraction this function needs.\n- **Confused with**: `SLN` (above). The two answer the same accounting question and give\n  different numbers, because `SLN` spreads `cost − salvage` while `AMORLINC` charges `rate` on\n  `cost` and stops when it hits `salvage`.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n1. **The only computed quantity is the first-period fraction.** Everything downstream is\n   repeated multiplication and subtraction of a constant, so an implementation's accuracy is\n   entirely the accuracy of its day count.\n3. **Basis 1 (\"Actual\") is under-specified**, as everywhere in this category. The reference\n   engine splits the interval at calendar-year boundaries and divides each piece by that year's\n   own length; other constructions are defensible and give different fractions across a leap\n   day. See [YEARFRAC](FUNC.YEARFRAC.md).\n4. **The schedule must be iterated.** The last charge depends on the cumulative total, so there\n   is no closed form for period *n*; the cost is `O(period)`, and an error in the first fraction\n   propagates to the termination point of the whole schedule.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns a `Number`: the charge for the requested period, in the units of `cost`.\n\n- **Period 0 is the prorated one.** Period 1 is a full annual charge even when the asset was\n  bought a week before `first_period`.\n- **The schedule terminates on the depreciable basis.** Charges continue at `cost × rate` until\n  the cumulative total reaches `cost − salvage`; the final period takes only the remainder, and\n  every period after that returns 0 rather than an error.\n- **`salvage` = `cost`** gives a depreciable basis of zero, so period 0 returns 0.\n- **`date_purchased` = `first_period`** gives a fraction of exactly 1 — a full first period,\n  with no proration.\n- Empty, missing and error arguments follow the shared call model; see\n  [The value universe](../model/01-value-universe.md).\n\n\n### Errors\n\n\n**Microsoft's Learn page documents no error conditions for this function at all** — it carries\nthe parameter table, the basis table, the proration sentence and the date-system notes, and\nstops. Its sibling's page documents a `#NUM!` band; this one documents nothing. That silence is\nitself a finding: there is no published statement of what `AMORLINC` does with a negative\n`cost`, a `salvage` above `cost`, or a `basis` of 2, even though the basis table's omission of 2\nimplies the last one.\n\n",
    "sources": "- Microsoft Learn, **WorksheetFunction.AmorDegrc method (Excel)** —\n  <https://learn.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.amordegrc>. Cited\n  for the sentence describing the two functions' relationship and for the sibling's documented\n  error band.\n- Microsoft 365 support, **AMORLINC function** —\n  <https://support.microsoft.com/en-us/office/amorlinc-function-7d417b45-f7f5-4dba-a0a5-3451a81079a8>.\n  The worksheet-surface page; **not retrieved** for this entry (the host returned HTTP 403), so\n  nothing here is quoted from it.\n- Handbook, [YEARFRAC](FUNC.YEARFRAC.md) — the day-count basis axis and the 30/360 rules.\n- Handbook, `content/lastbit/MATERIAL_W109_PRIMITIVES.md` §21 — the recorded case of two 30/360\n  routines in one engine disagreeing on month-end pairs.\n- Handbook chapters [01 the value universe](../model/01-value-universe.md),\n  [02 coercion and lifting](../model/02-coercion-and-lifting.md),\n  [06 claim language](../model/06-claim-language.md).\n- `data/functions/FUNC.AMORLINC.json`, `data/presence/FUNC.AMORLINC.json`,\n  `data/battery/FUNC.AMORLINC.json`.\n\n",
    "version-differences": "No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.",
    "what-it-does": "The schedule is as simple as depreciation gets:\n\n>     annual charge      = cost × rate\n>     first charge (period 0) = cost × rate × f,  where f = fraction of the first period held\n>     every later charge = cost × rate,  until the depreciable basis (cost − salvage) runs out\n>     final charge       = whatever is left of the depreciable basis\n\n`f` is a day-count fraction from `date_purchased` to `first_period`, computed on the chosen\n`basis`. When the asset is bought exactly on `first_period` the fraction is 1 and the first\nperiod is a full one.\n\nThe only genuinely interesting quantity is `f`, and `f` is a [YEARFRAC](FUNC.YEARFRAC.md)\ncomputation under a different name. Everything else is a constant repeated until the money runs\nout.\n\n`period` is **0-based** — period 0 is the prorated first period. This is the same convention as\n[AMORDEGRC](FUNC.AMORDEGRC.md) and the opposite of [DB](FUNC.DB.md) and [DDB](FUNC.DDB.md),\nwhich count from 1. Mixing the two conventions in one model is the most common way to get a\nplausible but wrong depreciation schedule.\n\n\n\n### Arguments\n\n\n`AMORLINC(cost, date_purchased, first_period, salvage, period, rate, [basis])`\n\n| Argument | Meaning | Required? |\n|---|---|---|\n| `cost` | The cost of the asset. | Required |\n| `date_purchased` | The date of purchase. | Required |\n| `first_period` | The date of the **end of the first period**. | Required |\n| `salvage` | The salvage value at the end of the asset's life. | Required |\n| `period` | The period. **0-based**: 0 is the prorated first period. | Required |\n| `rate` | The annual rate of depreciation. | Required |\n| `basis` | The year basis. | Optional, defaults to 0 |\n\n`first_period` is the argument readers misread most often. It is not the *length* of the first\nperiod and it is not the start of anything: it is the date on which the first accounting period\n**ends**. The prorated fraction is measured from `date_purchased` up to it.\n\n**The basis table for this function has four rows, not five.** Microsoft's Learn page gives:\n\n| `basis` | Date system |\n|---|---|\n| 0 or omitted | 360 days (NASD method) |\n| 1 | Actual |\n| 3 | 365 days in a year |\n| 4 | 360 days in a year (European method) |\n\nDate arguments are Excel date serials in numeric slots. Microsoft's page carries the standard\nwarning that dates should come from `DATE` or from other formulas rather than being typed as\ntext; ordinary coercion rules are in\n[Coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n"
  },
  "signature": {
    "display": "AMORLINC(cost, date_purchased, first_period, salvage, period, rate, [basis])",
    "parameters": [
      {
        "description": null,
        "name": "cost",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "date_purchased",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "first_period",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "salvage",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "period",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "rate",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "basis",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 7,
        "min": 6
      },
      "category": "Financial functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "None",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "French accounting straight-line depreciation for one period, prorated in the first period",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the depreciation for each accounting period",
        "microsoft_url": "https://support.microsoft.com/en-us/office/amorlinc-function-7d417b45-f7f5-4dba-a0a5-3451a81079a8"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "AMORLINC"
        },
        {
          "locale": "bg-BG",
          "name": "AMORLINC"
        },
        {
          "locale": "cs-CZ",
          "name": "AMORLINC"
        },
        {
          "locale": "da-DK",
          "name": "AMORLINC"
        },
        {
          "locale": "de-DE",
          "name": "AMORLINC"
        },
        {
          "locale": "el-GR",
          "name": "AMORLINC"
        },
        {
          "locale": "en-AU",
          "name": "AMORLINC"
        },
        {
          "locale": "en-GB",
          "name": "AMORLINC"
        },
        {
          "locale": "en-US",
          "name": "AMORLINC"
        },
        {
          "locale": "es-ES",
          "name": "AMORTIZ.LIN"
        },
        {
          "locale": "et-EE",
          "name": "AMORLINC"
        },
        {
          "locale": "fi-FI",
          "name": "AMORLINC"
        },
        {
          "locale": "fr-FR",
          "name": "AMORLINC*"
        },
        {
          "locale": "he-IL",
          "name": "AMORLINC"
        },
        {
          "locale": "hr-HR",
          "name": "AMORLINC"
        },
        {
          "locale": "hu-HU",
          "name": "ÉRTÉKCSÖKK"
        },
        {
          "locale": "id-ID",
          "name": "AMORLINC"
        },
        {
          "locale": "it-IT",
          "name": "AMORLINC"
        },
        {
          "locale": "ja-JP",
          "name": "AMORLINC"
        },
        {
          "locale": "ko-KR",
          "name": "AMORLINC"
        },
        {
          "locale": "lt-LT",
          "name": "AMORLINC"
        },
        {
          "locale": "lv-LV",
          "name": "AMORLINC"
        },
        {
          "locale": "nb-NO",
          "name": "AMORLINC"
        },
        {
          "locale": "nl-NL",
          "name": "AMORLINC"
        },
        {
          "locale": "pl-PL",
          "name": "AMORT.LIN"
        },
        {
          "locale": "pt-BR",
          "name": "AMORLINC"
        },
        {
          "locale": "pt-PT",
          "name": "AMORLINC"
        },
        {
          "locale": "ro-RO",
          "name": "AMORLINC"
        },
        {
          "locale": "ru-RU",
          "name": "АМОРУВ"
        },
        {
          "locale": "sk-SK",
          "name": "AMORLINC"
        },
        {
          "locale": "sl-SI",
          "name": "AMORLINC"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "AMORLINC"
        },
        {
          "locale": "sv-SE",
          "name": "AMORLINC"
        },
        {
          "locale": "th-TH",
          "name": "AMORLINC"
        },
        {
          "locale": "tr-TR",
          "name": "AMORLINC işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "AMORLINC"
        },
        {
          "locale": "vi-VN",
          "name": "AMORLINC"
        },
        {
          "locale": "zh-CN",
          "name": "AMORLINC"
        },
        {
          "locale": "zh-HK",
          "name": "AMORLINC"
        },
        {
          "locale": "zh-TW",
          "name": "AMORLINC"
        }
      ],
      "signature": {
        "display": "AMORLINC(cost, date_purchased, first_period, salvage, period, rate, [basis])",
        "parameters": [
          {
            "description": null,
            "name": "cost",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "date_purchased",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "first_period",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "salvage",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "period",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "rate",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "basis",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "AMORLINC",
      "version_marker": null,
      "xlcall": {
        "code": "467",
        "symbol": "xlfAmorlinc"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/amorlinc-function-7d417b45-f7f5-4dba-a0a5-3451a81079a8"
  },
  "try_it": {
    "formula": "=AMORLINC(1000,DATE(2024,1,1),DATE(2024,12,31),100,1,0.15,0)"
  },
  "url": "https://handbook.dnacalc.com/functions/AMORLINC.html",
  "variants": [],
  "versions": []
}