{
  "id": "average-rate-of-change",
  "version": "ccd6d6f0a1c2",
  "status": "published",
  "name": "Average Rate of Change Calculator",
  "question": "What is the average rate of change?",
  "summary": "Finds the average rate of change of a function f(x) on an interval [a, b], (f(b) − f(a)) ÷ (b − a), with f(a), f(b), the secant line and a graph, exactly in fractions when it can.",
  "category": "math",
  "subcategory": "algebra",
  "url": "https://www.acalculator.org/math/average-rate-of-change-calculator",
  "markdown": "https://www.acalculator.org/math/average-rate-of-change-calculator.md",
  "kind": "function",
  "method": "Average rate of change = (f(b) − f(a)) ÷ (b − a), the slope of the secant line through (a, f(a)) and (b, f(b)).",
  "assumptions": [
    "The variable is x; angles are in radians; ln and log are the natural logarithm, log10 is base 10.",
    "A formula of numbers, x, + − × ÷ and whole-number powers is worked out exactly in fractions from the typed decimals; any other formula in double precision.",
    "f must have a real value at both a and b; a and b must differ. The order of a and b does not change the answer."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "f": {
        "title": "Function f(x)",
        "description": "The function, typed like x^2 - 1/x, 2/x^2 or sqrt(x).",
        "type": "string",
        "maxLength": 200
      },
      "a": {
        "title": "From x = a",
        "description": "The start of the interval.",
        "type": "number"
      },
      "b": {
        "title": "To x = b",
        "description": "The end of the interval.",
        "type": "number"
      }
    }
  },
  "outputs": {
    "rate": {
      "label": "Average rate of change",
      "description": "(f(b) − f(a)) ÷ (b − a), the slope of the secant line.",
      "format": "number"
    },
    "fraction": {
      "label": "As a fraction",
      "description": "The rate as an exact fraction, when f uses only numbers, x, + − × ÷ and whole powers.",
      "format": "text"
    },
    "fa": {
      "label": "f(a)",
      "description": "The value of f at the start of the interval.",
      "format": "number"
    },
    "fb": {
      "label": "f(b)",
      "description": "The value of f at the end of the interval.",
      "format": "number"
    },
    "dy": {
      "label": "Change in f (Δy)",
      "description": "The change in f: f(b) − f(a).",
      "format": "number"
    },
    "dx": {
      "label": "Change in x (Δx)",
      "description": "The width of the interval: b − a.",
      "format": "number"
    },
    "secant": {
      "label": "Secant line",
      "description": "The line through (a, f(a)) and (b, f(b)).",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "f": "x^2 - 1/x",
      "a": 2,
      "b": 4
    },
    "outputs": {
      "rate": 6.125,
      "fraction": "49/8",
      "fa": 3.5,
      "fb": 15.75,
      "dy": 12.25,
      "dx": 2,
      "secant": "y − 7/2 = (49/8)(x − 2)"
    },
    "text": "The average rate of change of f(x) = x^2 - 1/x from x = 2 to x = 4 is 6.125."
  },
  "examples": [
    {
      "given": {
        "f": "x^2 - 1/x",
        "a": 2,
        "b": 4
      },
      "expect": {
        "rate": 6.125,
        "fraction": "49/8",
        "fa": 3.5,
        "fb": 15.75,
        "dy": 12.25,
        "dx": 2
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §3.3 Rates of Change and Behavior of Graphs. https://openstax.org/books/algebra-and-trigonometry-2e/pages/3-3-rates-of-change-and-behavior-of-graphs, retrieved 2026-10-02, Example 4: f(x) = x² − 1/x on [2, 4] has an average rate of change of 49/8"
    },
    {
      "given": {
        "f": "2/x^2",
        "a": 2,
        "b": 6
      },
      "expect": {
        "rate": -0.1111111111111111,
        "fraction": "−1/9",
        "fa": 0.5,
        "fb": 0.05555555555555555
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §3.3 Rates of Change and Behavior of Graphs. https://openstax.org/books/algebra-and-trigonometry-2e/pages/3-3-rates-of-change-and-behavior-of-graphs, retrieved 2026-10-02, Example 5: F(d) = 2/d² on [2, 6] changes at −1/9 per unit on average"
    },
    {
      "given": {
        "f": "x^2 + 3x + 1",
        "a": 0,
        "b": 2
      },
      "expect": {
        "rate": 5,
        "fraction": "5",
        "fa": 1,
        "fb": 11
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §3.3 Rates of Change and Behavior of Graphs. https://openstax.org/books/algebra-and-trigonometry-2e/pages/3-3-rates-of-change-and-behavior-of-graphs, retrieved 2026-10-02, Example 6: g(t) = t² + 3t + 1 on [0, a] has rate a + 3, so 5 for a = 2; hand calculation in content.mdx"
    }
  ],
  "sources": [
    "OpenStax, Algebra and Trigonometry 2e, §3.3 Rates of Change and Behavior of Graphs (average rate of change = Δy/Δx = (f(x₂) − f(x₁))/(x₂ − x₁); Example 4: f(x) = x² − 1/x on [2, 4] gives 49/8; Example 5: F(d) = 2/d² on [2, 6] gives −1/9; Example 6: g(t) = t² + 3t + 1 on [0, a] gives a + 3). https://openstax.org/books/algebra-and-trigonometry-2e/pages/3-3-rates-of-change-and-behavior-of-graphs (retrieved 2026-10-02)"
  ],
  "related": [
    "rate-of-change",
    "instantaneous-rate-of-change",
    "slope",
    "point-slope-form"
  ],
  "changelog": []
}
