{
  "id": "exponential-function",
  "version": "3b851b935ff9",
  "status": "published",
  "name": "Exponential Function Calculator",
  "question": "What is my exponential function?",
  "summary": "Evaluates f(x) = a·bˣ, or finds the exponential function through two points, with the percent growth or decay rate, the continuous rate k = ln b, and the doubling time or half-life.",
  "category": "math",
  "subcategory": "algebra",
  "url": "https://www.acalculator.org/math/exponential-function-calculator",
  "markdown": "https://www.acalculator.org/math/exponential-function-calculator.md",
  "kind": "function",
  "method": "f(x) = a·bˣ; from two points, b = (y₂ ÷ y₁)^(1 ÷ (x₂ − x₁)) and a = y₁ ÷ b^x₁; rate = (b − 1) × 100%; k = ln b; doubling time or half-life = ln 2 ÷ |ln b|.",
  "assumptions": [
    "a ≠ 0, b > 0 and b ≠ 1 (OpenStax’s definition of an exponential function).",
    "Typed numbers are exact decimals; whole powers are exact, roots and fractional powers are decimal numbers."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "mode": {
        "title": "I know",
        "description": "a and b of f(x) = a·bˣ, or two points the function passes through.",
        "type": "string",
        "enum": [
          "ab",
          "points"
        ]
      },
      "a": {
        "title": "a (initial value)",
        "description": "f(0), the value where x = 0. It may not be 0.",
        "type": "number",
        "minimum": -1000000000,
        "maximum": 1000000000
      },
      "b": {
        "title": "b (base)",
        "description": "The growth factor per step of x: more than 0, and not 1.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000
      },
      "x1": {
        "title": "x₁",
        "description": "The x of the first point.",
        "type": "number",
        "minimum": -1000000000,
        "maximum": 1000000000
      },
      "y1": {
        "title": "y₁",
        "description": "The y of the first point. Not 0.",
        "type": "number",
        "minimum": -1000000000,
        "maximum": 1000000000
      },
      "x2": {
        "title": "x₂",
        "description": "The x of the second point. Not the same as x₁.",
        "type": "number",
        "minimum": -1000000000,
        "maximum": 1000000000
      },
      "y2": {
        "title": "y₂",
        "description": "The y of the second point: not 0, and the same sign as y₁.",
        "type": "number",
        "minimum": -1000000000,
        "maximum": 1000000000
      },
      "x": {
        "title": "x",
        "description": "Where to evaluate the function.",
        "type": "number",
        "minimum": -10000,
        "maximum": 10000
      }
    }
  },
  "outputs": {
    "fx": {
      "label": "f(x)",
      "description": "a·bˣ at the x you typed.",
      "format": "number"
    },
    "equation": {
      "label": "Function",
      "description": "f(x) = a·bˣ with a and b to 10 significant figures.",
      "format": "text"
    },
    "a": {
      "label": "a (initial value)",
      "description": "The value of f at x = 0.",
      "format": "number"
    },
    "b": {
      "label": "b (growth factor)",
      "description": "The factor f grows by each time x goes up by 1.",
      "format": "number"
    },
    "rate": {
      "label": "Rate per step",
      "description": "(b − 1) × 100: positive for growth, negative for decay.",
      "format": "percent"
    },
    "kind": {
      "label": "Growth or decay",
      "description": "Growth when b > 1, decay when 0 < b < 1.",
      "format": "text"
    },
    "k": {
      "label": "Continuous rate k",
      "description": "k = ln b, so f(x) = a·e^(kx).",
      "format": "number"
    },
    "doubling": {
      "label": "Doubling time or half-life",
      "description": "ln 2 ÷ |ln b|: the change in x that doubles (growth) or halves (decay) f.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "mode": "ab",
      "a": 100,
      "b": 1.05,
      "x1": -2,
      "y1": 6,
      "x2": 2,
      "y2": 1,
      "x": 10
    },
    "outputs": {
      "fx": 162.88946267774415,
      "equation": "f(x) = 100·1.05ˣ",
      "a": 100,
      "b": 1.05,
      "rate": 5.000000000000004,
      "kind": "Exponential growth",
      "k": 0.04879016416943205,
      "doubling": 14.206699082890461
    },
    "text": "f(x) = 100·1.05ˣ; at your x, f(x) = 162.8894627."
  },
  "examples": [
    {
      "given": {
        "mode": "points",
        "x1": -2,
        "y1": 6,
        "x2": 2,
        "y2": 1,
        "x": 0
      },
      "expect": {
        "a": 2.449489742783178,
        "b": 0.6389431042462724,
        "fx": 2.449489742783178,
        "kind": "Exponential decay"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §6.1 Exponential Functions, Example 5 (f(x) = 2.4492(0.6389)ˣ through (−2, 6) and (2, 1)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-1-exponential-functions; full precision: b = (1/6)^(1/4), a = 6b²",
      "tolerance": 1e-12
    },
    {
      "given": {
        "mode": "ab",
        "a": 100,
        "b": 1.05,
        "x": 10
      },
      "expect": {
        "fx": 162.88946267774415,
        "rate": 5,
        "kind": "Exponential growth",
        "doubling": 14.206699082890461
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §6.1 Exponential Functions (f(x) = abˣ, b > 1 is growth), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-1-exponential-functions; hand calculation in content.mdx: 100 × 1.05¹⁰ = 162.889462677744140625 exactly; ln 2 ÷ ln 1.05 = 14.2067"
    },
    {
      "given": {
        "mode": "points",
        "x1": 0,
        "y1": 3,
        "x2": 1,
        "y2": 12,
        "x": 3
      },
      "expect": {
        "a": 3,
        "b": 4,
        "fx": 192,
        "rate": 300
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §6.1 Exponential Functions (writing f(x) = abˣ from two points), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-1-exponential-functions; hand calculation in content.mdx: a = 3, b = 4, f(3) = 3 × 64 = 192"
    },
    {
      "given": {
        "mode": "ab",
        "a": 80,
        "b": 0.5,
        "x": -2
      },
      "expect": {
        "fx": 320,
        "doubling": 1,
        "rate": -50
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §6.1 Exponential Functions (0 < b < 1 is decay), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-1-exponential-functions; hand calculation in content.mdx: 80 × 0.5⁻² = 320; half-life ln 2 ÷ ln 2 = 1"
    }
  ],
  "sources": [
    "OpenStax, Algebra and Trigonometry 2e, §6.1 Exponential Functions (f(x) = abˣ with a nonzero and b positive, b ≠ 1; Example 5: through (−2, 6) and (2, 1), f(x) = 2.4492(0.6389)ˣ). https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-1-exponential-functions (retrieved 2026-10-02)"
  ],
  "related": [
    "exponential-growth",
    "exponent",
    "log",
    "growth-rate"
  ],
  "changelog": []
}
