{
  "category": "Financial functions",
  "display_name": "ISPMT",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.ISPMT",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 6 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 6 recorded answers",
    "workbook_corpus": {
      "cells": 6,
      "matched": 6
    }
  },
  "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#L198-L200",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/financial_time_value_family.rs#L1036-L1052"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/financial::tv_out",
        "ported/financial_time_value_family::validate_finite"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/financial.rs#L198-L200",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 6 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.ISPMT.json",
  "name": "ISPMT",
  "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- **[IPMT](FUNC.IPMT.md)** — the same question under a *different loan model*. `IPMT` assumes a\n  constant total payment; `ISPMT` assumes constant principal repayment. They agree on nothing except\n  at `nper = 1`, and their period indices are offset by one. Substituting one for the other is a\n  modelling error, not a refactor.\n- **`PPMT`** — the principal component under the annuity model. `ISPMT`'s principal component needs\n  no function: it is `pv/nper`, constant.\n- **`PMT`** — the constant total payment. Under `ISPMT`'s model the total payment is *not* constant:\n  it is `pv/nper + ISPMT(per)`, which declines each period.\n- **`CUMIPMT`** — cumulative interest under the annuity model. There is no `ISPMT` cumulative\n  sibling; the sum is closed-form, `pv·rate·(nper − 1)/2` over `per = 0 … nper − 1`.\n- **`SLN`** — straight-line *depreciation*, the same \"equal instalments\" idea applied to an asset\n  rather than a debt. The two functions are conceptual cousins and are often used together.\n- **Confused with**: `IPMT`, constantly. If a model's interest column is a straight line, it came\n  from `ISPMT`; if it curves, it came from `IPMT`.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\n`ISPMT` is the numerically easiest function in this batch and it is worth saying why, because the\ncontrast is instructive.\n\nThe expression `pv × rate × (per/nper − 1)` has one division, two multiplications and one\nsubtraction, and **no cancellation of consequence**. The subtraction `per/nper − 1` loses precision\nonly as `per → nper`, where the true answer is approaching zero anyway, so the *relative* error of a\nvanishing quantity degrades while the *absolute* error stays bounded by rounding. Nothing\ncompounds, nothing iterates, no transcendental function is involved. There is no small-rate regime,\nno `expm1`/`log1p` question, no evaluation-order decision of any consequence.\n\nThat is a direct consequence of the model: straight-line amortization is linear, and linear\nfunctions are numerically boring. Every difficulty catalogued on the [IPMT](FUNC.IPMT.md) page —\nthe near-payoff cancellation, the dependence on an accurate `PMT`, the `expm1` substrate, the\nepsilon-band trap around zero rate — exists because the annuity balance is *exponential*. `ISPMT`\nbuys its simplicity by modelling a different loan.\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number` — an interest amount carrying the family sign convention.\n\n- **`per = 0`** gives `−pv·rate`, the largest charge. **`per = nper`** gives exactly `0`.\n- **Non-integer `per`** is accepted and interpolates linearly; nothing truncates it.\n- **`rate = 0`** returns zero for every period, with no special branch needed.\n- **Negative `pv`** flips the sign throughout, as the convention requires.\n- Empty, missing and error arguments follow the shared call model; see\n  [The value universe](../model/01-value-universe.md) and\n  [Coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n\n### Errors\n\n\nMicrosoft's `ISPMT` page does not publish an error table in the way the securities functions do.\nWhat the Handbook can state:\n\n",
    "sources": "- Microsoft, \"ISPMT function\" —\n  <https://support.microsoft.com/en-us/office/ispmt-function-fa58adb6-9d39-4ce0-8f43-75399cea56cc>\n  (syntax, the four argument descriptions, and the unit-consistency rule for `rate` and `nper`).\n- Handbook, [IPMT](FUNC.IPMT.md) — the annuity-model counterpart, its indexing and its numerical\n  difficulties, against which this page's contrast is drawn.\n- Handbook, [The value universe](../model/01-value-universe.md) and\n  [Coercion and lifting](../model/02-coercion-and-lifting.md).\n- Handbook projections `data/functions/FUNC.ISPMT.json` and `data/presence/FUNC.ISPMT.json` (arity,\n  classification axes, implementing module and the fifteen-surface family it shares).\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": "\n`ISPMT(rate, per, nper, pv)` returns the interest paid during period `per` of a loan in which the\n**principal is repaid in equal instalments** — a straight-line amortization, not the constant-total-\npayment annuity that [IPMT](FUNC.IPMT.md) models.\n\nThe closed form is one line:\n\n    ISPMT = pv × rate × (per/nper − 1)\n\nRead it as interest on the remaining balance. Under straight-line repayment the outstanding\nprincipal after `per` instalments is `pv × (1 − per/nper)`, and the interest charged is `rate` times\nthat:\n\n    remaining balance = pv × (nper − per)/nper\n    interest          = rate × remaining balance = pv × rate × (per/nper − 1) × (−1)\n\nThe sign is the family's: with a positive `pv` (money you received) the result is **negative**,\nmoney leaving. That is why the formula is written with `(per/nper − 1)`, which is negative on the\nadmissible range, rather than the positive `(1 − per/nper)`.\n\n**The period index starts at 0, not at 1.** This falls straight out of the formula and it is the\nsingle most important fact on this page:\n\n| `per` | `ISPMT` | Meaning |\n|---|---|---|\n| `0` | `−pv·rate` | Interest on the full principal — the first period |\n| `nper/2` | `−pv·rate/2` | Half the principal repaid |\n| `nper` | `0` | Nothing outstanding — the loan is retired |\n\nSo a loan with `nper = 10` has its ten interest charges at `per = 0 … 9`, and `ISPMT(rate, 10, 10,\npv)` is zero rather than the last instalment. `IPMT`, its near-namesake, indexes `1 … nper`. Two\nfunctions whose names differ by one letter, whose signatures look alike, and whose first period is a\ndifferent number.\n\nThe result is **linear in `per`**: the interest declines by a constant `pv·rate/nper` each period.\nThat is the visible signature of straight-line amortization, and it is how you tell at a glance\nwhich loan model a column of numbers came from — annuity interest decays geometrically, straight-line\ninterest decays in a straight line.\n\n`ISPMT` exists for Lotus 1-2-3 compatibility. It is not the function to reach for in new work unless\nthe straight-line model is genuinely what you mean.\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Default |\n|---|---|---|\n| `rate` | The interest rate **per period** for the investment. Required. | — |\n| `per` | The period for which the interest is wanted; counted from `0`. Required. | — |\n| `nper` | The total number of payment periods. Required. | — |\n| `pv` | The present value — the principal. Required. | — |\n\nAll four are required; there is no `fv` and no `type`. The absence of `type` is not an oversight:\nunder straight-line repayment with the instalment at period end there is nothing for a timing switch\nto select, and the model has no annuity-due variant.\n\n**`rate` and `nper` must use the same period**, exactly as in the annuity functions. A 10% annual\nrate on a monthly schedule is `0.1/12`.\n\n"
  },
  "signature": {
    "display": "ISPMT(rate, per, nper, pv)",
    "parameters": [
      {
        "description": null,
        "name": "rate",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "per",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "nper",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "pv",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 4,
        "min": 4
      },
      "category": "Financial functions",
      "classification": {
        "arg_preparation_profile": "RefsVisibleInAdapter",
        "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": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Interest paid in one period of a loan repaid in equal principal parts",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Calculates the interest paid during a specific period of an investment",
        "microsoft_url": "https://support.microsoft.com/en-us/office/ispmt-function-fa58adb6-9d39-4ce0-8f43-75399cea56cc"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "ISPMT"
        },
        {
          "locale": "bg-BG",
          "name": "ISPMT"
        },
        {
          "locale": "cs-CZ",
          "name": "ISPMT"
        },
        {
          "locale": "da-DK",
          "name": "RP.YDELSE"
        },
        {
          "locale": "de-DE",
          "name": "ISPMT"
        },
        {
          "locale": "el-GR",
          "name": "ISPMT"
        },
        {
          "locale": "en-AU",
          "name": "ISPMT"
        },
        {
          "locale": "en-GB",
          "name": "ISPMT"
        },
        {
          "locale": "en-US",
          "name": "ISPMT"
        },
        {
          "locale": "es-ES",
          "name": "INT.PAGO.DIR"
        },
        {
          "locale": "et-EE",
          "name": "ISPMT"
        },
        {
          "locale": "fi-FI",
          "name": "ONMAKSU"
        },
        {
          "locale": "fr-FR",
          "name": "ISPMT*"
        },
        {
          "locale": "he-IL",
          "name": "ISPMT"
        },
        {
          "locale": "hr-HR",
          "name": "ISPMT"
        },
        {
          "locale": "hu-HU",
          "name": "LRÉSZLETKAMAT"
        },
        {
          "locale": "id-ID",
          "name": "ISPMT"
        },
        {
          "locale": "it-IT",
          "name": "ISPMT"
        },
        {
          "locale": "ja-JP",
          "name": "ISPMT"
        },
        {
          "locale": "ko-KR",
          "name": "ISPMT"
        },
        {
          "locale": "lt-LT",
          "name": "ISPMT"
        },
        {
          "locale": "lv-LV",
          "name": "ISPMT"
        },
        {
          "locale": "nb-NO",
          "name": "ISPMT"
        },
        {
          "locale": "nl-NL",
          "name": "ISBET"
        },
        {
          "locale": "pl-PL",
          "name": "ISPMT"
        },
        {
          "locale": "pt-BR",
          "name": "ISPMT"
        },
        {
          "locale": "pt-PT",
          "name": "É.PGTO"
        },
        {
          "locale": "ro-RO",
          "name": "ISPMT"
        },
        {
          "locale": "ru-RU",
          "name": "ПРОЦПЛАТ"
        },
        {
          "locale": "sk-SK",
          "name": "ISPMT"
        },
        {
          "locale": "sl-SI",
          "name": "ISPMT"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "ISPMT"
        },
        {
          "locale": "sv-SE",
          "name": "RALÅN"
        },
        {
          "locale": "th-TH",
          "name": "ISPMT"
        },
        {
          "locale": "tr-TR",
          "name": "ISPMT işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "ISPMT"
        },
        {
          "locale": "vi-VN",
          "name": "ISPMT"
        },
        {
          "locale": "zh-CN",
          "name": "ISPMT"
        },
        {
          "locale": "zh-HK",
          "name": "ISPMT"
        },
        {
          "locale": "zh-TW",
          "name": "ISPMT"
        }
      ],
      "signature": {
        "display": "ISPMT(rate, per, nper, pv)",
        "parameters": [
          {
            "description": null,
            "name": "rate",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "per",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "nper",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "pv",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "ISPMT",
      "version_marker": null,
      "xlcall": {
        "code": "350",
        "symbol": "xlfIspmt"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/ispmt-function-fa58adb6-9d39-4ce0-8f43-75399cea56cc"
  },
  "try_it": {
    "formula": "=ISPMT(0.05,1,5,1000)"
  },
  "url": "https://handbook.dnacalc.com/functions/ISPMT.html",
  "variants": [],
  "versions": []
}