Average Rate of Change Calculator: Formula, Secant Line and Examples
By FindMySum · Last reviewed
An average rate of change calculator measures how fast a quantity changes over an interval. Type a function f(x) and an interval from a to b, or enter two points, and this one gives the average rate of change, the values at each end, the change in x and in y, and the equation of the secant line, with a graph of the function and the line. It evaluates the function with the same 64-digit evaluator as the site's scientific calculator.
The formula
For a function f on the interval [a, b]:
average rate of change = (f(b) − f(a)) ÷ (b − a) = Δy ÷ Δx
The top is how much the output changed; the bottom is how much the input changed. The result is in units of output per unit of input: kilometres per hour, dollars per year, degrees per minute.
Between two points (x₁, y₁) and (x₂, y₂) the same formula reads (y₂ − y₁) ÷ (x₂ − x₁), the slope of the line through them.
Worked example with the default
The calculator opens with f(x) = x² + 3x on the interval [1, 4]:
- f(1) = 1 + 3 = 4
- f(4) = 16 + 12 = 28
- Δy = 28 − 4 = 24 and Δx = 4 − 1 = 3
- Average rate of change = 24 ÷ 3 = 8
On average, f increases by 8 for every unit increase in x between 1 and 4. OpenStax's precalculus textbook works a similar example, f(x) = x² − 1/x on [2, 4]: f(2) = 3.5 and f(4) = 15.75, so the average rate of change is 12.25 ÷ 2 = 6.125, or 49/8.
The secant line
Draw a straight line through the two points on the graph, (a, f(a)) and (b, f(b)). That line is called a secant line, and its slope is the average rate of change. Its equation follows from the point-slope form:
y = m·x + c, with m the average rate of change and c = f(a) − m·a
For the default example, c = 4 − 8 × 1 = −4, so the secant line is y = 8x − 4. The graph shows it crossing the curve at x = 1 and x = 4. Between those points the parabola dips below the line, because a parabola that opens upward is curving faster than any straight line through two of its points.
What the number tells you, and what it doesn't
An average rate hides what happens in between. A car that is 60 km from home after one hour and 330 km away after four hours averaged 90 km/h, but it may have stopped for lunch and driven faster later. For f(x) = x² on [−2, 2], the average rate of change is zero, even though the function fell to 0 and rose back to 4. A positive rate only says the function ended higher than it started.
That makes the interval important. The same function can have very different average rates on different intervals: x² has a rate of 3 on [1, 2] but 11 on [5, 6]. That changing rate is exactly what calculus studies.
From average to instantaneous rate
Shrink the interval and the secant line rotates toward the tangent line at a single point. For x² + 3x at x = 1, the average rate of change on [1, 1.1] is 5.1, on [1, 1.01] it is 5.01, and on [1, 1.001] it is 5.001. The values approach 5, the derivative f′(1) = 2 × 1 + 3. Try progressively narrower intervals in the calculator to watch the limit happen.
Typing functions
Use x as the variable. The evaluator understands + − * / and ^, brackets, implicit multiplication such as 2x or 3(x + 1), and the functions sqrt, cbrt, abs, exp, ln, log (base 10), sin, cos and tan and their inverses, along with the constants pi and e. Trigonometric functions use radians by default, which is what calculus uses; switch to degrees if your problem gives angles in degrees. If the function is undefined at either end of the interval, for example ln(x) at x = 0, the calculator tells you rather than returning a misleading number.
For the slope, midpoint and equation of a line from two points, the equation solver has more options, and to fit a line to many points, use the regression calculator.
More questions
Is average rate of change the same as average value?
No. The average rate of change measures how fast the function changes, (f(b) − f(a)) ÷ (b − a). The average value of a function on an interval is the mean height of its graph, found with an integral in calculus. A function can have a large average value and an average rate of change of zero.
What is the difference quotient?
The same idea written with a step h: (f(x + h) − f(x)) ÷ h. It is the average rate of change from x to x + h. Letting h approach zero turns it into the derivative, which is why the difference quotient appears at the start of every calculus course.
How is percentage change related?
Percentage change divides the change by the starting value instead of by the change in x: (new − old) ÷ old × 100%. Average rate of change keeps the units of the problem, such as dollars per year, while percentage change is unitless. The percentage calculator handles that case.
Can I use the calculator for a table of values?
Pick the two rows that bound the interval you care about and use the two-points mode: the average rate of change only depends on the endpoints. If you want a single rate that fits all the rows, fit a line with the regression calculator instead; its slope summarises every point.
Why do I get a different answer when I swap a and b?
You shouldn't: swapping both the inputs and the outputs flips the sign of the top and the bottom, so the ratio is unchanged. If you swapped only the x values, the result changes sign. Check that f(a) is paired with a and f(b) with b.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.