UTILS.
100% in-browser
📉

Average Rate of Change & Secant Line Calculator

Compute the average rate of change of f(x) over [a,b] and the secant line through the two endpoints, in slope-intercept and point-slope form.

Enter f(x) using x as the variable and the two interval endpoints a and b.

About this tool

The Average Rate of Change & Secant Line Calculator is a free, in-browser tool that measures how fast a function changes on average across an interval. Given f(x) and two endpoints a and b, the average rate of change is the difference quotient m = (f(b) − f(a)) / (b − a) — the slope of the straight secant line joining the two points (a, f(a)) and (b, f(b)) on the curve. This is the discrete, interval version of the derivative, which is the instantaneous rate at a single point.

All of the arithmetic runs locally in your browser using a small expression parser, so nothing you enter leaves your device. Type the function with x as the variable (for example x^2, sin(x), or 1/x) and the two endpoints, and the calculator returns the average rate of change (the secant slope), both endpoints (a, f(a)) and (b, f(b)), and the secant line itself in slope-intercept form y = m·x + c and point-slope form.

The secant line is the foundation of differential calculus: as the second point b approaches a, the secant slope approaches the tangent slope, and the average rate of change becomes the instantaneous rate — the derivative f′(a). For f(x) = x² on [1, 3] the average rate of change is (9 − 1)/(3 − 1) = 4, so the secant line is y = 4x − 3.

Frequently asked questions

What is the average rate of change formula?
It is the difference quotient m = (f(b) − f(a)) / (b − a) over the interval [a, b]. It equals the slope of the secant line connecting the points (a, f(a)) and (b, f(b)) on the graph of f.
What is a secant line?
A secant line is a straight line that passes through two points on a curve. Its slope is the average rate of change of the function between those points, and its equation is y = m(x − a) + f(a) where m is that slope.
How is the secant related to the tangent?
As the two endpoints move closer together (b → a), the secant line approaches the tangent line, and the average rate of change approaches the instantaneous rate of change — the derivative f′(a). The secant is the interval approximation of the tangent.
What is the average rate of change of x² on [1, 3]?
f(1) = 1 and f(3) = 9, so the average rate of change is (9 − 1)/(3 − 1) = 8/2 = 4. The secant line through (1, 1) and (3, 9) is therefore y = 4x − 3.

More tools