{
  "id": "financial",
  "version": "9f986a745472",
  "status": "published",
  "name": "Financial Calculator",
  "question": "What is the missing financial value?",
  "summary": "Solves the time value of money equation for any one of N, I/Y, PV, PMT and FV, with payments and compounding 1 to 365 times a year, at the end or the start of each period.",
  "category": "finance",
  "subcategory": "investing",
  "url": "https://www.acalculator.org/finance/financial-calculator",
  "markdown": "https://www.acalculator.org/finance/financial-calculator.md",
  "kind": "function",
  "method": "PV × (1 + i)^N + PMT × (1 + i × t) × ((1 + i)^N − 1) ÷ i + FV = 0, with i = (1 + I/Y ÷ (100 × C/Y))^(C/Y ÷ P/Y) − 1 and t = 1 for payments at the start of each period (BGN), 0 at the end (END). Money received is positive, money paid is negative.",
  "assumptions": [
    "The interest rate is the same in every period, and every payment is the same size.",
    "The yearly rate is nominal, compounded as many times a year as set; payments are made as many times a year as set.",
    "No fees or taxes are included. This is an estimate for planning, not financial advice."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "solve": {
        "title": "Compute",
        "description": "Which of the five values to work out, like the CPT key; type the other four.",
        "type": "string",
        "enum": [
          "n",
          "rate",
          "pv",
          "pmt",
          "fv"
        ]
      },
      "n": {
        "title": "N (number of periods)",
        "description": "The number of payment periods, for example 360 for 30 years of monthly payments.",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 12000
      },
      "rate": {
        "title": "I/Y (yearly interest rate)",
        "description": "The nominal yearly interest rate in percent, compounded C/Y times a year.",
        "type": "number",
        "x-unit": "percent",
        "exclusiveMinimum": -100,
        "maximum": 1000
      },
      "pv": {
        "title": "PV (present value)",
        "description": "The amount at the start. Money you receive is positive; money you pay is negative.",
        "type": "number",
        "x-unit": "USD",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "pmt": {
        "title": "PMT (payment)",
        "description": "The payment made each period, with the same sign rule: money you pay is negative.",
        "type": "number",
        "x-unit": "USD",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "fv": {
        "title": "FV (future value)",
        "description": "The amount after the last period, with the same sign rule. 0 for a loan paid off.",
        "type": "number",
        "x-unit": "USD",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "py": {
        "title": "P/Y (payments a year)",
        "description": "How many payments are made in a year: 12 for monthly.",
        "type": "integer",
        "minimum": 1,
        "maximum": 365
      },
      "cy": {
        "title": "C/Y (compounding a year)",
        "description": "How many times a year interest compounds. Usually the same as P/Y.",
        "type": "integer",
        "minimum": 1,
        "maximum": 365
      },
      "due": {
        "title": "Payments at the",
        "description": "The end of each period (END, an ordinary annuity) or the start of each period (BGN, an annuity due).",
        "type": "string",
        "enum": [
          "end",
          "begin"
        ]
      }
    }
  },
  "outputs": {
    "n": {
      "label": "N (number of periods)",
      "description": "The number of payment periods, for example 360 for 30 years of monthly payments.",
      "format": "number"
    },
    "rate": {
      "label": "I/Y (yearly interest rate)",
      "description": "The nominal yearly interest rate in percent, compounded C/Y times a year.",
      "format": "percent"
    },
    "pv": {
      "label": "PV (present value)",
      "description": "The amount at the start. Money you receive is positive; money you pay is negative.",
      "format": "money"
    },
    "pmt": {
      "label": "PMT (payment)",
      "description": "The payment made each period, with the same sign rule: money you pay is negative.",
      "format": "money"
    },
    "fv": {
      "label": "FV (future value)",
      "description": "The amount after the last period, with the same sign rule. 0 for a loan paid off.",
      "format": "money"
    },
    "periodRate": {
      "label": "Rate per period",
      "description": "The interest rate for one payment period, i = (1 + I/Y ÷ C/Y)^(C/Y ÷ P/Y) − 1.",
      "format": "percent"
    },
    "ear": {
      "label": "Effective yearly rate",
      "description": "The rate over a whole year once interest compounds: (1 + i)^(P/Y) − 1.",
      "format": "percent"
    },
    "totalPmt": {
      "label": "Total of payments",
      "description": "N × PMT, with the payment’s sign.",
      "format": "money"
    },
    "interest": {
      "label": "Net interest",
      "description": "PV + N × PMT + FV: interest you earn (positive) or pay (negative) over the whole time, from the signs of the cash flows.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "solve": "pmt",
      "py": 12,
      "cy": 12,
      "due": "end",
      "pmt": -1199.1,
      "n": 360,
      "rate": 6,
      "pv": 200000,
      "fv": 0
    },
    "outputs": {
      "pmt": -1199.1010503055047,
      "periodRate": 0.5,
      "ear": 6.1677811864499565,
      "totalPmt": -431676.3781099817,
      "interest": -231676.37810998168
    },
    "text": "N = 360, I/Y = 6%, PV = $200,000.00, PMT = -$1,199.10, FV = $0.00."
  },
  "examples": [
    {
      "given": {
        "solve": "pmt",
        "n": 10,
        "rate": 8,
        "pv": 10000,
        "fv": 0,
        "py": 12,
        "cy": 12,
        "due": "end"
      },
      "expect": {
        "pmt": -1037.0320893591531,
        "totalPmt": -10370.320893591532,
        "interest": -370.3208935915318
      },
      "source": "Microsoft Excel PMT function, example 1: ($1,037.03) (https://support.microsoft.com/en-us/office/pmt-function-0214da64-9a63-4996-bc20-214433fa6441); Python 3 cross-check"
    },
    {
      "given": {
        "solve": "fv",
        "n": 10,
        "rate": 6,
        "pv": -500,
        "pmt": -200,
        "py": 12,
        "cy": 12,
        "due": "begin"
      },
      "expect": {
        "fv": 2581.4033740601803
      },
      "source": "Microsoft Excel FV function, example 1: $2,581.40 (https://support.microsoft.com/en-us/office/fv-function-2eef9f44-a084-4c61-bdd8-4fe4bb1b71b3); Python 3 cross-check"
    },
    {
      "given": {
        "solve": "n",
        "rate": 12,
        "pv": -1000,
        "pmt": -100,
        "fv": 10000,
        "py": 12,
        "cy": 12,
        "due": "begin"
      },
      "expect": {
        "n": 59.6738656742946
      },
      "source": "Microsoft Excel NPER function, example 1: 59.6738657 (https://support.microsoft.com/en-us/office/nper-function-240535b5-6653-4d2d-bfcf-b6a38151d815); Python 3 cross-check"
    },
    {
      "given": {
        "solve": "rate",
        "n": 48,
        "pv": 8000,
        "pmt": -200,
        "fv": 0,
        "py": 12,
        "cy": 12,
        "due": "end"
      },
      "expect": {
        "rate": 9.24176698584236
      },
      "source": "Microsoft Excel RATE function example: 9.24% a year (https://support.microsoft.com/en-us/office/rate-function-9f665657-4a7e-4bb7-a030-83fc59e748ce); Python 3 cross-check",
      "tolerance": 1e-8
    },
    {
      "given": {
        "solve": "pmt",
        "n": 300,
        "rate": 5,
        "pv": 300000,
        "fv": 0,
        "py": 12,
        "cy": 2,
        "due": "end"
      },
      "expect": {
        "pmt": -1744.8149551110464,
        "periodRate": 0.41239154651442345,
        "ear": 5.0625
      },
      "source": "Texas Instruments BA II PLUS Guidebook, TVM worksheet with C/Y ≠ P/Y (https://education.ti.com/html/eguides/financials/pdfs/EN/BA-II-PLUS_EN.pdf); hand calculation in content.mdx",
      "tolerance": 1e-8
    }
  ],
  "sources": [
    "Texas Instruments, BA II PLUS Guidebook: the Time-Value-of-Money worksheet (N, I/Y, PV, PMT, FV, P/Y, C/Y, BGN/END) and its formulas. https://education.ti.com/html/eguides/financials/pdfs/EN/BA-II-PLUS_EN.pdf",
    "Microsoft, Excel PMT, FV, NPER and RATE functions, with worked examples. https://support.microsoft.com/en-us/office/pmt-function-0214da64-9a63-4996-bc20-214433fa6441",
    "S. A. Broverman (2017), Mathematics of Investment and Credit, 7th edition, chapters 1 and 2: equivalent rates, annuities immediate and annuities due."
  ],
  "related": [
    "tvm",
    "present-value",
    "interest-rate",
    "future-value",
    "amortization"
  ],
  "changelog": []
}
