Rate of change calculator: average and instantaneous rates
The average rate of change of a function between two points is the change in y divided by the change in x: (f(b) − f(a)) ÷ (b − a), the slope of the straight line (the secant) joining them. The instantaneous rate of change at one point is the slope of the tangent there, which is the derivative f′(a). This rate of change calculator gives both for any function you type, and lets you shrink the interval to watch the average rate close in on the instantaneous one.
It opens on f(x) = x² from x = 1 to x = 3. Type your own function, or open the full rate of change calculator over this page.
Rate of Change Calculator
Find average and instantaneous rates of change
How to use the rate of change calculator
- Type the function in f(x), for example x^2 for x², or sin(x).
- Under Interval, set where it Starts at x and its Width, from 0.01 to 10. The interval runs from a to a + width. You can also drag the two points on the graph.
- Read the answer at the top: the average rate over the interval and the instantaneous rate at its start. Beside it are f at each end, the gap between the two rates and the derivative f′(x).
- Follow the steps: the secant slope with your numbers, then (for polynomials) the slope written from first principles, then the derivative and its value at the point.
- Press play under Shrink the interval to watch the secant line slide into the tangent as the width falls. The table shows the average rate for widths of 1, 0.5, 0.1, 0.01 and 0.001.
- To practise, press Random problem in the Practice section.
Average rate of change formula
It is the slope of the secant line through (a, f(a)) and (b, f(b)), and its units are the y units per x unit, such as metres per second or dollars per year. A positive rate means f is going up over the interval on the whole, and a negative rate means it is going down. It says nothing about what happens in between: a function can rise and fall and still have an average rate of 0.
Instantaneous rate of change
Write the interval as a to a + h. As the width h shrinks to 0, the secant turns into the tangent, and its slope becomes the derivative:
The fraction is the difference quotient, and this limit is differentiation from first principles. In practice you find f′(x) with the differentiation rules and put a in, which is what the calculator does after showing the limit.
Worked examples you can check in the calculator
Example 1: average and instantaneous rate of x²
For f(x) = x² from x = 1 to x = 3, the calculator's opening example:
The average rate is 4. The derivative is f′(x) = 2x, so the instantaneous rate at x = 1 is 2. Now shrink the width and watch the average rate fall towards 2:
| Width h | Average rate from x = 1 | Gap from 2 |
|---|---|---|
| 1 | 3 | 1 |
| 0.5 | 2.5 | 0.5 |
| 0.1 | 2.1 | 0.1 |
| 0.01 | 2.01 | 0.01 |
| 0.001 | 2.001 | 0.001 |
Example 2: first principles
The table suggests the average rate is always 2 + h. First principles proves it. For f(x) = x² at a = 1:
As h goes to 0, 2 + h goes to 2. For any polynomial, the calculator writes out this expression in h as one of its steps, so the limit is easy to see.
Try differentiating from first principles yourself, then press Mark to check in the Calculus course.
Fill in each first-principles step to differentiate a simple function.
Press Mark to have your answer marked in the Calculus course.
Example 3: a cubic
For f(x) = x³ − 2x, set the start to 2 and the width to 0.5. Then f(2) = 4 and f(2.5) = 10.625:
The average rate is 13.25. The derivative is f′(x) = 3x² − 2, so the instantaneous rate at x = 2 is 3 × 4 − 2 = 10. The curve gets steeper as x grows, so the average over the interval is higher than the rate at its start.
Example 4: a negative rate
For f(x) = 10/x from x = 1 to x = 4, f falls from 10 to 2.5, so the average rate is (2.5 − 10) ÷ 3 = −2.5. The derivative is −10/x², so the instantaneous rate at x = 1 is −10: the curve is falling steeply at the start of the interval and levelling off by the end.
Example 5: average rate of change from a table
You don't need a formula for an average rate, just two points. If the temperature is 12 °C at 8 am and 21 °C at 2 pm, the average rate of change is (21 − 12) ÷ 6 = 1.5 °C per hour. For an instantaneous rate from data, draw the tangent at the time you want and measure its slope.
Try one
Rates of change in real life
- Distance against time: the average rate is average speed, and the instantaneous rate is the speed at that moment.
- Velocity against time: the rate of change is acceleration.
- Cost against items made: the instantaneous rate is the marginal cost, the cost of one more.
- Population against time: the rate is the growth rate, in people per year.
Common mistakes
- Flipping the fraction. It is change in y over change in x, not the other way round.
- Mixing the order. Subtract in the same order top and bottom: f(b) − f(a) over b − a.
- Using x values instead of f values on top. Work out f(a) and f(b) first.
- Confusing average with instantaneous. An average rate needs an interval. An instantaneous rate is at one point, and needs the derivative or a tangent.
- Leaving out units. A rate is always y units per x unit.
Common questions
How do you find the average rate of change?
How do you find the instantaneous rate of change?
Is the average rate of change the same as slope?
What is the difference between a secant line and a tangent line?
Can I use functions other than polynomials?
Revision cards
Read the front, say your answer, then flip to check.
Where to go next
- Solve it
Rate of Change Calculator
Find average and instantaneous rates of change
Open the tool - Learn it
Calculus
Differentiation, integration and the mathematics that drives physics and engineering
Start the course - Test it
AP Calculus AB
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper