{
  "category": "Financial functions",
  "display_name": "AMORDEGRC",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.AMORDEGRC",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 46 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 46 recorded answers",
    "workbook_corpus": {
      "cells": 46,
      "matched": 46
    }
  },
  "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#L316-L321",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/amor_depreciation_family.rs#L161-L166",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/amor_depreciation_family.rs#L168-L171",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/amor_depreciation_family.rs#L173-L187",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/amor_depreciation_family.rs#L235-L287"
      ],
      "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#L316-L321",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 46 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.AMORDEGRC.json",
  "name": "AMORDEGRC",
  "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- **[AMORLINC](FUNC.AMORLINC.md)** — the same function without the acceleration. Microsoft\n  describes the pair explicitly: `AMORDEGRC` \"is similar to AmorLinc, except that a depreciation\n  coefficient is applied in the calculation depending on the life of the assets.\" Same\n  arguments, same proration, same four-row basis table; different charge per period.\n- **[DB](FUNC.DB.md)** — the Anglo-American fixed-declining-balance function. It also prorates a\n  partial first year, but through a `month` argument rather than a pair of dates, and its rate\n  is derived from the salvage ratio rather than supplied. `DB` is period-1-based;\n  `AMORDEGRC` is period-0-based.\n- **[DDB](FUNC.DDB.md)** and `VDB` — declining balance with an explicit factor. `VDB` is the\n  closest in spirit, since it also handles partial periods, but it prorates by period number\n  rather than by calendar date.\n- **`SLN`, `SYD`** — the straight-line and sum-of-years-digits schedules, with no proration at\n  all.\n- **Confused with**: `AMORLINC` (above), and with `DDB` — the coefficient here is *not* the\n  `factor` argument of `DDB`; it is derived from `rate` and cannot be supplied.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n1. **The coefficient is a step function, so the result is discontinuous in `rate`.** Crossing\n   a band boundary changes the answer by a finite amount, not by an epsilon. Any implementation\n   that compares `1/rate` against 3, 5 or 6 in floating point is deciding those boundaries with\n   a comparison that a rate like `0.2` (life exactly 5) will exercise — and `1.0/0.2` is exactly\n   5 in binary64, while `1.0/0.15` is not exactly 6.667. Pin the comparison, and state whether\n   the boundary is inclusive.\n4. **The stopping rule needs the whole schedule.** There is no closed form for period *n*: the\n   book value depends on every rounded charge before it, so the implementation must iterate.\n   That makes the function `O(period)` and makes early-period errors permanent.\n5. `1/rate` is used both as a coefficient selector and, ceilinged, as the schedule length. Those\n   two uses can disagree for a `rate` whose reciprocal is barely above an integer.\n\n\n",
    "quirks": "\n### The depreciation coefficient\n\n\nMicrosoft's Learn page publishes this table:\n\n| Life of assets (1/rate) | Depreciation coefficient |\n|---|---|\n| Between 3 and 4 years | 1.5 |\n| Between 5 and 6 years | 2 |\n| More than 6 years | 2.5 |\n\nand immediately below it, this sentence:\n\n> \"If the life of assets is between 0 (zero) and 1, 1 and 2, 2 and 3, or 4 and 5, the #NUM!\n> error value is returned.\"\n\nRead together, the documentation says the function is defined only for lives in [3, 4], [5, 6]\nand (6, ∞), and errors everywhere else — including the whole band between 4 and 5 years, which\nis a hole in the middle of the domain rather than an edge case.\n\nThe two disagree on two named bands, and the disagreement is not subtle:\n\n\n### Result and edge cases\n\n\nReturns a `Number`: the depreciation charge for the requested period, in the units of `cost`.\n\n- **`period` = 0 is the first period**, and it is the only prorated one. Asking for period 1 on\n  an asset bought mid-period returns a full-period charge, not the prorated one.\n- **`date_purchased` after `first_period`** is rejected; the proration fraction would be\n  negative.\n- Empty, missing and error arguments follow the shared call model; see\n  [The value universe](../model/01-value-universe.md).\n\n\n\n### Errors\n\n\nDocumented on Microsoft's Learn page — one condition only, and it is the coefficient-band\nsentence quoted above: a life between 0 and 1, 1 and 2, 2 and 3, or 4 and 5 returns `#NUM!`.\nNo other error condition is documented there.\n\n",
    "sources": "- Microsoft Learn, **WorksheetFunction.AmorDegrc method (Excel)** —\n  <https://learn.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.amordegrc>. Source\n  of the parameter table, the four-row basis table (with no `basis` = 2), the depreciation\n  coefficient table, the \"50 percent … 100 percent\" sentence, the stopping-rule sentence, the\n  \"provided for the French accounting system\" statement, and the `#NUM!` life-range sentence\n  quoted above.\n- Microsoft Learn, **WorksheetFunction.AmorLinc method (Excel)** —\n  <https://learn.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.amorlinc>. Cited for\n  the identical parameter list and basis table.\n- Microsoft 365 support, **AMORDEGRC function** —\n  <https://support.microsoft.com/en-us/office/amordegrc-function-a14d0ca1-64a4-42eb-9b3d-b0dededf9e51>.\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\n  30/360 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.AMORDEGRC.json`, `data/presence/FUNC.AMORDEGRC.json`,\n  `data/battery/FUNC.AMORDEGRC.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": "Two ideas define it, and the second is what separates it from its sibling:\n\n1. **Proration of the first period.** If the asset is bought part-way through the first\n   accounting period, the first charge is scaled by the fraction of that period the asset was\n   held. That fraction is a day-count computation on the chosen `basis`, from\n   `date_purchased` to `first_period`.\n2. **A declining-balance charge with a statutory coefficient.** The annual rate is not `rate`\n   but `rate × coefficient`, where the coefficient is a step function of the asset's life; and\n   in the last two periods the rate is forced up so the book value is fully written off.\n\nSketching the schedule the way the documentation describes it:\n\n>     effective rate  = rate × coefficient(1 / rate)\n>     first charge    = cost × effective rate × first-period fraction\n>     later charges   = book value × effective rate\n>     second-to-last  = book value × 50 %\n>     last            = the whole remaining book value\n\nMicrosoft states the last two lines directly: \"The depreciation rate will grow to 50 percent for\nthe period preceding the last period and will grow to 100 percent for the last period.\" And it\nstates the stopping rule: \"This function will return the depreciation until the last period of\nthe life of the assets or until the cumulated value of depreciation is greater than the cost of\nthe assets minus the salvage value.\"\n\n`period` is **0-based** here — period 0 is the prorated first period — which is unusual in\nExcel's depreciation category and is the single most common source of an off-by-one answer.\n\n\n### Arguments\n\n\n`AMORDEGRC(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 rate of depreciation — the *un*-accelerated annual rate, whose reciprocal is the life. | Required |\n| `basis` | The year basis. | Optional, defaults to 0 |\n\n`rate` carries two jobs at once: it is the base depreciation rate *and*, through `1/rate`, the\nasset's life in periods. Changing `rate` therefore moves the schedule length and the coefficient\nband simultaneously, which is why small changes to it can produce large, discontinuous changes\nto the answer.\n\n**The basis table for this function is not the usual one.** 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; see\n[Coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n"
  },
  "signature": {
    "display": "AMORDEGRC(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 depreciation for one period, with a coefficient that depends on the asset's life",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the depreciation for each accounting period by using a depreciation coefficient",
        "microsoft_url": "https://support.microsoft.com/en-us/office/amordegrc-function-a14d0ca1-64a4-42eb-9b3d-b0dededf9e51"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "AMORDEGRC"
        },
        {
          "locale": "bg-BG",
          "name": "AMORDEGRC"
        },
        {
          "locale": "cs-CZ",
          "name": "AMORDEGRC"
        },
        {
          "locale": "da-DK",
          "name": "AMORDEGRC"
        },
        {
          "locale": "de-DE",
          "name": "AMORDEGRC"
        },
        {
          "locale": "el-GR",
          "name": "AMORDEGRC"
        },
        {
          "locale": "en-AU",
          "name": "AMORDEGRC"
        },
        {
          "locale": "en-GB",
          "name": "AMORDEGRC"
        },
        {
          "locale": "en-US",
          "name": "AMORDEGRC"
        },
        {
          "locale": "es-ES",
          "name": "AMORTIZ.PROGRE"
        },
        {
          "locale": "et-EE",
          "name": "AMORDEGRC"
        },
        {
          "locale": "fi-FI",
          "name": "AMORDEGRC"
        },
        {
          "locale": "fr-FR",
          "name": "AMORDEGRC*"
        },
        {
          "locale": "he-IL",
          "name": "AMORDEGRC"
        },
        {
          "locale": "hr-HR",
          "name": "AMORDEGRC"
        },
        {
          "locale": "hu-HU",
          "name": "ÉRTÉKCSÖKK.TÉNYEZŐVEL"
        },
        {
          "locale": "id-ID",
          "name": "AMORDEGRC"
        },
        {
          "locale": "it-IT",
          "name": "AMORDEGRC"
        },
        {
          "locale": "ja-JP",
          "name": "AMORDEGRC"
        },
        {
          "locale": "ko-KR",
          "name": "AMORDEGRC"
        },
        {
          "locale": "lt-LT",
          "name": "AMORDEGRC"
        },
        {
          "locale": "lv-LV",
          "name": "AMORDEGRC"
        },
        {
          "locale": "nb-NO",
          "name": "AMORDEGRC"
        },
        {
          "locale": "nl-NL",
          "name": "AMORDEGRC"
        },
        {
          "locale": "pl-PL",
          "name": "AMORT.NIELIN"
        },
        {
          "locale": "pt-BR",
          "name": "AMORDEGRC"
        },
        {
          "locale": "pt-PT",
          "name": "AMORDEGRC"
        },
        {
          "locale": "ro-RO",
          "name": "AMORDEGRC"
        },
        {
          "locale": "ru-RU",
          "name": "АМОРУМ"
        },
        {
          "locale": "sk-SK",
          "name": "AMORDEGRC"
        },
        {
          "locale": "sl-SI",
          "name": "AMORDEGRC"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "AMORDEGRC"
        },
        {
          "locale": "sv-SE",
          "name": "AMORDEGRC"
        },
        {
          "locale": "th-TH",
          "name": "AMORDEGRC"
        },
        {
          "locale": "tr-TR",
          "name": "AMORDEGRC işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "AMORDEGRC"
        },
        {
          "locale": "vi-VN",
          "name": "AMORDEGRC"
        },
        {
          "locale": "zh-CN",
          "name": "AMORDEGRC"
        },
        {
          "locale": "zh-HK",
          "name": "AMORDEGRC"
        },
        {
          "locale": "zh-TW",
          "name": "AMORDEGRC"
        }
      ],
      "signature": {
        "display": "AMORDEGRC(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": "AMORDEGRC",
      "version_marker": null,
      "xlcall": {
        "code": "466",
        "symbol": "xlfAmordegrc"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/amordegrc-function-a14d0ca1-64a4-42eb-9b3d-b0dededf9e51"
  },
  "try_it": {
    "formula": "=AMORDEGRC(1000,DATE(2024,1,1),DATE(2024,12,31),100,1,0.15,0)"
  },
  "url": "https://handbook.dnacalc.com/functions/AMORDEGRC.html",
  "variants": [],
  "versions": []
}