Uni-Sine
MathematicsCalculus

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.

Try it

Rate of Change Calculator

Find average and instantaneous rates of change

Go to its page

How to use the rate of change calculator

  1. Type the function in f(x), for example x^2 for x², or sin(x).
  2. 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.
  3. 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).
  4. 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.
  5. 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.
  6. To practise, press Random problem in the Practice section.

Average rate of change formula

\text{average rate} = \frac{f(b) - f(a)}{b - a} = \frac{\Delta y}{\Delta x}

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:

f'(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h}

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:

\frac{f(3) - f(1)}{3 - 1} = \frac{9 - 1}{2} = 4

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 hAverage rate from x = 1Gap from 2
131
0.52.50.5
0.12.10.1
0.012.010.01
0.0012.0010.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:

\frac{(1 + h)^2 - 1^2}{h} = \frac{1 + 2h + h^2 - 1}{h} = \frac{2h + h^2}{h} = 2 + h

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:

\frac{10.625 - 4}{0.5} = 13.25

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

practice
Pick an answer, then check it.
What is the average rate of change of f(x) = x² + 1 from x = 2 to x = 5?

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?
Work out f at both ends of the interval, subtract, and divide by the difference in x: (f(b) − f(a)) ÷ (b − a). For x² from 1 to 3 that is (9 − 1) ÷ 2 = 4.
How do you find the instantaneous rate of change?
Differentiate the function and put in the x value. For x² at x = 1, f′(x) = 2x, so the rate is 2. Without calculus, use smaller and smaller intervals and see what the average rate approaches.
Is the average rate of change the same as slope?
Yes. It is the slope of the secant line between the two points. For a straight line, the average rate of change is the same everywhere: it is the line's slope.
What is the difference between a secant line and a tangent line?
A secant crosses the curve at two points, and its slope is an average rate. A tangent touches the curve at one point, and its slope is the instantaneous rate there.
Can I use functions other than polynomials?
Yes: sines, exponentials, logs and fractions all work. The first principles step is written out for polynomials only. For other functions the calculator shows the limit and then uses the differentiation rules.

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
Read next
Chemistry · Rates and equilibriumRate of reaction formula: mean rate, units and tangentsThe rate of reaction formula: mean rate from reactant used or product formed, units g/s, cm³/s and mol/s, rate from a tangent, the practical and examples.