The average value of a continuous function \( f \) on \( [a, b] \) is
$$f_{\text{avg}} = \frac{1}{b - a}\int_a^b f(x)\,dx$$
In words: integrate the function over the interval, then divide by the length of the interval. This page explains why that is the right definition, walks through examples from easy to exam-level, and covers the Mean Value Theorem for integrals, which says the function actually reaches its average somewhere.
Why this formula makes sense
To average \( n \) numbers, you add them and divide by \( n \). For a function, sample it at \( n \) evenly spaced points \( x_i \) with spacing \( \Delta x = \frac{b-a}{n} \):
$$\frac{f(x_1) + \dots + f(x_n)}{n} = \frac{1}{b - a}\sum f(x_i)\,\Delta x$$
As \( n \to \infty \), that Riemann sum becomes the integral.
The key algebra step is \( \frac1n = \frac{\Delta x}{b - a} \), which follows from \( \Delta x = \frac{b - a}{n} \). That’s what turns “divide by the number of samples” into “divide by the length of the interval.” A function has infinitely many values, so you cannot count them, but you can measure how long the interval is.
Geometric picture: \( f_{\text{avg}} \) is the height of the rectangle on \( [a, b] \) that has the same area as the region under the curve.
Imagine the region under the graph is water in a narrow tank. If the water is allowed to settle, the bumps flatten out into a level surface. The height of that level surface is the average value: the peaks fill in the valleys, and the total amount of water, the integral, stays the same.
How to find the average value
- Confirm \( f \) is continuous (or at least integrable) on \( [a, b] \).
- Evaluate \( \int_a^b f(x)\,dx \), usually with the Fundamental Theorem of Calculus.
- Divide by \( b - a \), the length of the interval.
- If asked, solve \( f(c) = f_{\text{avg}} \) and keep solutions in \( [a, b] \).
Example 1: x² on [0, 3]
$$f_{\text{avg}} = \frac13\int_0^3x^2\,dx = \frac13\cdot9 = 3$$
Example 2: sin x on [0, π]
$$f_{\text{avg}} = \frac1\pi\int_0^\pi\sin x\,dx = \frac2\pi \approx 0.6366$$
So over half a cycle, a sine wave averages about 64% of its peak. In electrical engineering, this is the “average rectified value.”
Example 3: eˣ on [0, 1]
$$f_{\text{avg}} = \int_0^1e^x\,dx = e - 1 \approx 1.718$$
Here \( b - a = 1 \), so the average value is just the integral itself.
Example 4: sin² x over a full period
$$\frac{1}{2\pi}\int_0^{2\pi}\sin^2x\,dx = \frac{\pi}{2\pi} = \frac12$$
This is the basis of RMS (root-mean-square) values: \( V_{\text{rms}} = \frac{V_{\text{peak}}}{\sqrt2} \). See integral of sin²x.
Example 5: a straight line
For \( f(x) = 2x + 1 \) on \( [1, 5] \), the integral is \( \big[x^2 + x\big]_1^5 = 30 - 2 = 28 \), and the interval has length 4, so the average is \( 7 \). Notice that \( f(1) = 3 \) and \( f(5) = 11 \), whose ordinary average is also 7. For a line, the average value is the value at the midpoint, because the region under it is a trapezoid. This shortcut fails as soon as the graph curves.
Example 6: a negative average
For \( f(x) = x \) on \( [-2, 1] \), the integral is \( \frac12 - 2 = -\frac32 \). Dividing by the length 3 gives \( f_{\text{avg}} = -\frac12 \). More of the area lies below the x-axis than above it, so the average is negative. The integral measures signed area, and the average inherits that sign.
Example 7: average daily temperature
Suppose the temperature \( t \) hours after 6 a.m. is modeled by
$$T(t) = 60 + 10\sin\frac{\pi t}{12}$$
degrees Fahrenheit. The average temperature over the 12 daytime hours is
$$\begin{aligned} T_{\text{avg}} &= \frac{1}{12}\int_0^{12}\left(60 + 10\sin\frac{\pi t}{12}\right)dt \\ &= \frac{1}{12}\left(720 + \frac{240}{\pi}\right) \\ &= 60 + \frac{20}{\pi} \approx 66.4 \end{aligned}$$
The sine term integrates to \( \frac{240}{\pi} \) using the u-substitution \( u = \frac{\pi t}{12} \). The answer makes sense: the temperature rises from 60 to a peak of 70 and back, so the average should land between those two values.
Mean Value Theorem for integrals
If \( f \) is continuous on \( [a, b] \), then there’s at least one \( c \) in \( [a, b] \) where the function actually equals its average:
$$f(c) = f_{\text{avg}}$$
For \( x^2 \) on \( [0, 3] \): \( c^2 = 3 \), so \( c = \sqrt3 \approx 1.732 \). Compare with the derivative version, the Mean Value Theorem.
Why it’s true
Since \( f \) is continuous on a closed interval, it has a minimum value \( m \) and a maximum value \( M \) there. The region under the graph fits between a rectangle of height \( m \) and one of height \( M \), so
$$m(b - a) \le \int_a^b f(x)\,dx \le M(b - a)$$
Dividing by \( b - a \) gives \( m \le f_{\text{avg}} \le M \). A continuous function takes every value between its minimum and maximum (the Intermediate Value Theorem), so it takes the value \( f_{\text{avg}} \) at some \( c \).
There is a second proof worth knowing. Let \( F(x) = \int_a^x f(t)\,dt \). Then \( F' = f \), and the derivative Mean Value Theorem applied to \( F \) gives exactly \( f(c) = \frac{F(b) - F(a)}{b - a} \). The two theorems are the same statement seen from two sides.
Example 8: finding c
For \( f(x) = \sqrt x \) on \( [0, 4] \), the integral is \( \frac23\cdot 4^{3/2} = \frac{16}{3} \), so \( f_{\text{avg}} = \frac43 \). Solving \( \sqrt c = \frac43 \) gives \( c = \frac{16}{9} \approx 1.78 \), which lies inside \( [0, 4] \) as the theorem promises.
Real-world uses
- Average temperature over a day from a temperature curve \( T(t) \).
- Average velocity: \( \frac{1}{b-a}\int_a^b v(t)\,dt = \frac{s(b) - s(a)}{b - a} \), the same as the slope of the position secant line. For example, if \( v(t) = 3t^2 \) on \( [0, 2] \), the average velocity is \( \frac82 = 4 \).
- Average concentration of a drug in the bloodstream over a dosing interval.
- Average cost or power: engineers quote the average power of an alternating current, which is why the RMS value above matters.
Common mistakes
- Forgetting to divide. The integral alone is total accumulation (area), not an average. Always divide by \( b - a \).
- Dividing by b instead of b − a. On \( [2, 6] \) the length is 4, not 6.
- Averaging the endpoints. \( \frac{f(a) + f(b)}{2} \) works only for straight lines, as Example 5 shows.
- Mixing up average value and average rate of change. The average value of \( f \) is \( \frac{1}{b-a}\int_a^b f \). The average rate of change of \( f \) is \( \frac{f(b) - f(a)}{b - a} \), which is the average value of \( f' \).
- Keeping a c outside the interval. When solving \( f(c) = f_{\text{avg}} \), discard any solutions not in \( [a, b] \).
Average value calculator
The gadget computes the integral, the average, and the points \( c \) where \( f(c) = f_{\text{avg}} \):
Average Value of a Function
\(f_{\text{avg}} = \frac{1}{b - a}\int_a^b f(x)\,dx\)
For a full-page version with more worked examples, use the average value calculator.
Practice problems
Try these before checking the answers.
- \( f(x) = x^3 \text{ on } [0, 2] \)
- \( f(x) = \frac1x \text{ on } [1, e] \)
- \( f(x) = \cos x \text{ on } [0, \frac\pi2] \)
- \( f(x) = 4 - x^2 \) on \( [-2, 2] \)
- \( f(x) = \frac{1}{1 + x^2} \) on \( [0, 1] \)
- Find every \( c \) guaranteed by the Mean Value Theorem for integrals for \( f(x) = x^2 - 2x \) on \( [0, 3] \).
Answers: (1) \( 2 \); (2) \( \frac{1}{e - 1} \), using the integral of 1/x; (3) \( \frac2\pi \); (4) \( \frac83 \); (5) \( \frac\pi4 \), since the antiderivative is \( \arctan x \); (6) the average is 0, and \( c^2 - 2c = 0 \) gives \( c = 0 \) and \( c = 2 \), both in the interval.
FAQ
Is the average value the same as (f(a) + f(b))/2?
Only for straight lines. For curved functions the integral is needed.
Can the average value be negative?
Yes, if more of the area lies below the x-axis than above it.
What is the difference between average value and average rate of change?
Average value asks “what is the typical height of \( f \)?” and uses an integral. Average rate of change asks “what is the typical slope of \( f \)?” and uses the difference quotient. They agree only in the sense that the average rate of change of \( f \) equals the average value of \( f' \).
Does the function have to be continuous?
The formula works for any integrable function, including ones with a few jumps. Continuity is needed for the Mean Value Theorem for integrals: a function with a jump can skip over its own average and never equal it.
Is the average value of a function the same as the mean in statistics?
It is the continuous version of the same idea. In probability, the expected value of \( f(X) \) for a variable spread uniformly over \( [a, b] \) is exactly \( \frac{1}{b-a}\int_a^b f(x)\,dx \).
Further reading
- Average Function Value (Paul’s Online Math Notes) — the definition, worked examples and the Mean Value Theorem for integrals
- The Definite Integral (OpenStax Calculus Volume 1) — the textbook section that defines the definite integral and ends with the average value of a function
Calculators for this topic
Keep learning
Optimization Problems in Calculus: 4 Solved Examples
Solve calculus optimization problems in 6 steps. Worked examples: the largest fenced area, the open box, the cheapest can and the closest point on a curve.
Related Rates: Step-by-Step Strategy and Classic Problems
Solve related rates problems in 6 steps. Worked classics: the sliding ladder, the expanding balloon, the draining cone and the moving shadow.

