{
  "id": "payback-period",
  "version": "61d7680b0f60",
  "status": "published",
  "name": "Payback Period Calculator",
  "question": "What is the payback period?",
  "summary": "Computes the payback period of a project, the time until its cash flows repay the initial cost, and the discounted payback period at a discount rate.",
  "category": "finance",
  "subcategory": "business",
  "url": "https://www.acalculator.org/finance/payback-period-calculator",
  "markdown": "https://www.acalculator.org/finance/payback-period-calculator.md",
  "kind": "function",
  "method": "Payback period = the year before the running total reaches the investment + the part still owed ÷ that year’s cash flow. The discounted payback does the same with each flow divided by (1 + rate)^year.",
  "assumptions": [
    "The investment is paid at the start; each cash flow comes in evenly through its year.",
    "The payback period is the first time the running total reaches the investment, even if a later year is negative.",
    "Arithmetic is exact on the typed decimals; years show to 2 decimals and money to the cent, halves up."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "investment": {
        "title": "Initial investment",
        "description": "What the project costs at the start.",
        "type": "number",
        "x-unit": "USD",
        "exclusiveMinimum": 0,
        "maximum": 1000000000000
      },
      "flows": {
        "title": "Cash flow each year",
        "description": "The net cash the project brings in during year 1, 2, 3 and so on, separated by spaces or new lines. Negative for a year that costs money.",
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "rate": {
        "title": "Discount rate",
        "description": "The yearly rate for the discounted payback period, such as your cost of capital.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      }
    }
  },
  "outputs": {
    "years": {
      "label": "Payback period",
      "description": "Years until the cash flows add up to the investment.",
      "format": "number"
    },
    "discounted": {
      "label": "Discounted payback period",
      "description": "Years until the discounted cash flows add up to the investment.",
      "format": "number"
    },
    "total": {
      "label": "Cash flows minus investment",
      "description": "All the cash flows added up, minus the investment, with no discounting.",
      "format": "money"
    },
    "npv": {
      "label": "Net present value",
      "description": "The discounted cash flows added up, minus the investment.",
      "format": "money"
    },
    "note": {
      "label": "Note",
      "description": "Says when the discounted cash flows never repay the investment.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "investment": 16000,
      "flows": "2000 4000 5000 5000 5000 5000",
      "rate": 9
    },
    "outputs": {
      "years": 4,
      "discounted": 5.0488764847312,
      "total": 10000,
      "npv": 2835.619379906453
    },
    "text": "An investment of $16,000.00 pays back in 4 years."
  },
  "examples": [
    {
      "given": {
        "investment": 16000,
        "flows": [
          2000,
          4000,
          5000,
          5000,
          5000,
          5000
        ],
        "rate": 9
      },
      "expect": {
        "years": 4,
        "discounted": 5.0488764847312,
        "total": 10000
      },
      "source": "OpenStax, Principles of Finance, 16.4 Alternative Methods (payback period and discounted payback period: $16,000 project, cash flows 2,000, 4,000, 5,000 × 4, 9% cost of funds). https://openstax.org/books/principles-finance/pages/16-4-alternative-methods: payback at the end of year 4; discounted payback 5 + 145.72 ÷ 2,981.34 = 5.05 years (Python 3 on the exact flows: 5.04887648)"
    },
    {
      "given": {
        "investment": 10000,
        "flows": [
          3000,
          3000,
          3000,
          3000,
          3000
        ],
        "rate": 0
      },
      "expect": {
        "years": 3.3333333333333335,
        "discounted": 3.3333333333333335
      },
      "source": "OpenStax, Principles of Finance, 16.4 Alternative Methods (payback period and discounted payback period: $16,000 project, cash flows 2,000, 4,000, 5,000 × 4, 9% cost of funds). https://openstax.org/books/principles-finance/pages/16-4-alternative-methods; hand calculation in content.mdx: 3 + 1,000 ÷ 3,000 = 3.33 years"
    },
    {
      "given": {
        "investment": 50000,
        "flows": [
          10000,
          15000,
          20000,
          25000
        ],
        "rate": 12
      },
      "expect": {
        "years": 3.2,
        "npv": 1010.0365082257392
      },
      "source": "OpenStax, Principles of Finance, 16.4 Alternative Methods (payback period and discounted payback period: $16,000 project, cash flows 2,000, 4,000, 5,000 × 4, 9% cost of funds). https://openstax.org/books/principles-finance/pages/16-4-alternative-methods; hand calculation in content.mdx: after 3 years 5,000 is left; 3 + 5,000 ÷ 25,000 = 3.2. Discounted flows at 12% sum to 51,010.04 (Python 3)"
    },
    {
      "given": {
        "investment": 1000,
        "flows": [
          600,
          -200,
          700
        ],
        "rate": 0
      },
      "expect": {
        "years": 2.857142857142857
      },
      "source": "OpenStax, Principles of Finance, 16.4 Alternative Methods (payback period and discounted payback period: $16,000 project, cash flows 2,000, 4,000, 5,000 × 4, 9% cost of funds). https://openstax.org/books/principles-finance/pages/16-4-alternative-methods; hand calculation in content.mdx: after 2 years 600 is left; 2 + 600 ÷ 700 = 2.857"
    }
  ],
  "sources": [
    "OpenStax, Principles of Finance, 16.4 Alternative Methods: payback period and discounted payback period, with a $16,000 project (cash flows of $2,000, $4,000 and four years of $5,000; payback 4 years; discounted payback at 9% of 5 + 145.72 ÷ 2,981.34 = 5.05 years). https://openstax.org/books/principles-finance/pages/16-4-alternative-methods (retrieved 2026-10-05)"
  ],
  "related": [
    "npv",
    "irr",
    "mirr",
    "roi",
    "break-even"
  ],
  "changelog": []
}
