Skip to main content

Average Rate of Change Calculator

Calculate the average rate of change of a function f(x) over an interval [a, b] — the slope of the secant line through (a, f(a)) and (b, f(b)) — with the secant line's equation and a step-by-step derivation.

Input

A function of x, written in standard math notation (^ for powers, sqrt(), sin(), etc.).

The left endpoint of the interval.

The right endpoint of the interval.

Output

Step-by-Step Derivation
Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/average-rate-of-change-calculator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "functionExpr": "x^2",
    "a": "1",
    "b": "4"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `average-rate-of-change-calculator` tool (Average Rate of Change Calculator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/average-rate-of-change-calculator/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="Average Rate of Change Calculator — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits

Also available with

Guides

The Average Rate of Change Calculator finds how fast a function f(x) changes, on average, between two points a and b — the same quantity as the slope of a straight line, just measured on a curve. It also derives the secant line's equation, the straight line that passes through (a, f(a)) and (b, f(b)), with a full step-by-step breakdown.

It's built for calculus students checking a homework answer, teachers preparing worked examples, and anyone who wants the secant slope of a function without doing the algebra by hand.

How to use it

  1. Enter your function in terms of x — standard math notation works: ^ for powers, plus sqrt(), sin(), cos(), log(), and the other functions supported by mathjs's expression parser.
  2. Enter a and b, the two endpoints of the interval you want the average rate of change over.
  3. Read Average Rate of Change for the secant slope, and Secant Line Equation for the line's equation in slope-intercept form.
  4. Step-by-Step Derivation shows both function evaluations and the full calculation.

Results update automatically as you type. For example, f(x) = x^2 on [1, 4] returns an average rate of change of 5 and a secant line of y = 5x - 4.

What is the average rate of change?

For a function f(x) on an interval [a, b], the average rate of change is the difference quotient:

m = (f(b) − f(a)) / (b − a)

Geometrically, this is the slope of the secant line — the straight line connecting the two points (a, f(a)) and (b, f(b)) on the curve. It's the calculus counterpart to "rise over run" for a straight line, generalized to any function, and it's the quantity the difference quotient converges toward the instantaneous rate of change (the derivative) as b approaches a.

Why does the calculator also give a line equation?

The average rate of change is just a number (the slope), but the secant line itself — the actual straight line through those two points — is often what a problem is really asking for, especially when sketching a graph. Once you know the slope m and one point on the line, (a, f(a)), the point-slope form y − f(a) = m(x − a) rearranges directly to slope-intercept form, which is what this calculator shows.

What functions can I enter?

Anything mathjs's expression evaluator understands: polynomials (x^3 - 2x + 1), trigonometric functions (sin(x), cos(x), tan(x)), roots and logarithms (sqrt(x), log(x)), and combinations of these. Angles in trig functions are in radians by default — write pi for π (e.g. sin(x) on [0, pi]).

For a straight line's own point-slope, slope-intercept, and standard forms from a point and slope, see the Point-Slope Form Calculator. To evaluate arbitrary math expressions directly, see the Math Evaluator.

Privacy

This calculator runs entirely in your browser. Your function and interval are never uploaded, logged, or stored — the computation happens locally on your device.

secant linesecant slopedifference quotientrate of changecalculusslope of a functionf(x)interval

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.