The average value of a continuous function \( f \) on a closed interval ( [a, b] ) is defined by the definite integral formula:
$$f_{\text{avg}} = \frac{1}{b - a} \int_a^b f(x) \, dx$$
In plain language: calculate the total accumulated area under the function over the interval ( [a, b] ). Then divide that accumulation by the total width of the interval, \( b - a \). This guide explains the intuitive geometric and algebraic origins of the formula. It also provides detailed step-by-step calculations for standard and exam-level examples. Furthermore, it explores the Mean Value Theorem for integrals, compares average value to related mathematical concepts, and highlights common pitfalls to avoid.
Why this formula makes sense
To compute the standard arithmetic mean of a finite set of \( n \) numbers, you sum all the values. Then you divide by \( n \):
$$\text{Average} = \frac{y_1 + y_2 + \dots + y_n}{n}$$
A continuous function \( f(x) \) on an interval ( [a, b] ) contains infinitely many values. So, you cannot simply add them up one by one. However, you can approximate the average height by sampling \( n \) evenly spaced points \( x_1, x_2, \dots, x_n \) along the interval. The distance between consecutive points is \( \Delta x = \frac{b - a}{n} \). Rearranging this relationship gives:
$$\frac{1}{n} = \frac{\Delta x}{b - a}$$
Substituting \( \frac{1}{n} \) into the discrete average formula transforms it into a Riemann sum divided by the interval width:
$$\frac{f(x_1) + f(x_2) + \dots + f(x_n)}{n} = \sum_{i=1}^n f(x_i) \left(\frac{1}{n}\right) = \frac{1}{b - a} \sum_{i=1}^n f(x_i) , \Delta x$$
Taking the limit as \( n \to \infty \) turns the discrete sum into a definite integral. This yields the exact formula for continuous average value:
$$f_{\text{avg}} = \lim_{n \to \infty} \frac{1}{b - a} \sum_{i=1}^n f(x_i) , \Delta x = \frac{1}{b - a} \int_a^b f(x) \, dx$$
Visualizing average as rectangle height
Geometric Picture: The quantity \( \int_a^b f(x) \, dx \) represents the net area between the curve \( y = f(x) \) and the x-axis on ( [a, b] ). Also, multiplying \( f_{\text{avg}} \) by the width \( (b - a) \) gives the area of a simple rectangle. This rectangle has a height of \( f_{\text{avg}} \) and a width of \( b - a \).
$$\text{Area under curve} = \int_a^b f(x) \, dx = f_{\text{avg}} \cdot (b - a) = \text{Area of rectangle}$$
Thus, \( f_{\text{avg}} \) represents the height of a horizontal box that encloses the exact same net area as the original fluctuating curve. Imagine the region under the graph is filled with liquid in a narrow glass tank. If allowed to settle, the crests drop and fill the troughs, flattening out into a smooth, horizontal surface. The steady height of that leveled liquid is precisely the average value \( f_{\text{avg}} \).
Units Analysis: Checking physical units confirms why dividing by \( b - a \) is necessary. If \( x \) is measured in seconds (s) and \( f(x) \) represents velocity in meters per second (m/s), the integral \( \int_a^b f(x) \, dx \) calculates total displacement in meters (m). Dividing that displacement by the time interval \( b - a \) in seconds (s) yields meters per second (m/s). This restores the original units of the function.
How to calculate average value step-by-step
- Verify integrability: Ensure \( f(x) \) is continuous or piecewise continuous on the closed interval ( [a, b] ).
- Find the interval length: Subtract the lower bound from the upper bound to get \( b - a \).
- Evaluate the definite integral: Compute \( \int_a^b f(x) \, dx \) using the Fundamental Theorem of Calculus or geometric formulas.
- Divide by the interval length: Multiply the integral result by \( \frac{1}{b - a} \) to determine \( f_{\text{avg}} \).
- Check feasibility: Confirm that \( f_{\text{avg}} \) falls between the minimum and maximum values of \( f(x) \) on ( [a, b] ).
- Find specific inputs (if required): Set \( f(c) = f_{\text{avg}} \) and solve for \( c \), keeping only solutions inside ( [a, b] ).
Worked Examples
Example 1: Polynomial function x² on [0, 3]
Find the average value of \( f(x) = x^2 \) on ( [0, 3] ).

The interval length is \( 3 - 0 = 3 \). First, evaluate the definite integral:
$$\int_0^3 x^2 \, dx = \left[ \frac{x^3}{3} \right]_0^3 = \frac{27}{3} - 0 = 9$$
Now divide by the interval length:
$$f_{\text{avg}} = \frac{1}{3 - 0} \int_0^3 x^2 \, dx = \frac{1}{3} \cdot 9 = 3$$
To find where the function equals its average, solve \( c^2 = 3 \), which yields \( c = \sqrt{3} \approx 1.732 \). Since ( 1.732 in [0, 3] ), this confirms the Mean Value Theorem for integrals.
Example 2: Trigonometric function sin x on [0, π]
Find the average value of \( f(x) = \sin x \) over half its period, \( [0, \pi] \).
The interval length is \( \pi - 0 = \pi \). Calculate the definite integral:
$$\int_0^\pi \sin x \, dx = \left[ -\cos x \right]_0^\pi = -\cos(\pi) - (-\cos(0)) = -(-1) + 1 = 2$$
Divide by interval length \( \pi \):
$$f_{\text{avg}} = \frac{1}{\pi} \int_0^\pi \sin x \, dx = \frac{2}{\pi} \approx 0.6366$$
In electrical engineering, \( \frac{2}{\pi} \) times peak voltage represents the “average rectified value” of a full-wave rectified sine wave signal.
Example 3: Exponential function eˣ on [0, 1]
Calculate the average value of \( f(x) = e^x \) on ( [0, 1] ).
The interval length is \( 1 - 0 = 1 \). The definite integral gives:
$$\int_0^1 e^x \, dx = \left[ e^x \right]_0^1 = e^1 - e^0 = e - 1$$
Because the interval length is 1, the average value equals the integral itself:
$$f_{\text{avg}} = \frac{1}{1} (e - 1) = e - 1 \approx 1.7183$$
Example 4: Trigonometric square sin² x over a full period [0, 2π]
Compute the average value of \( f(x) = \sin^2 x \) on \( [0, 2\pi] \).
Using the double-angle trigonometric identity \( \sin^2 x = \frac{1 - \cos(2x)}{2} \), compute the integral:
$$\int_0^{2\pi} \sin^2 x \, dx = \int_0^{2\pi} \frac{1 - \cos(2x)}{2} \, dx = \left[ \frac{x}{2} - \frac{\sin(2x)}{4} \right]_0^{2\pi} = \left(\frac{2\pi}{2} - 0\right) - (0 - 0) = \pi$$
Dividing by the interval length \( 2\pi - 0 = 2\pi \):
$$f_{\text{avg}} = \frac{1}{2\pi} \cdot \pi = \frac{1}{2}$$
This result is central to physics and electrical engineering. Taking the square root of this average gives the Root-Mean-Square (RMS) value: \( V_{\text{rms}} = \frac{V_{\text{peak}}}{\sqrt{2}} \). See the detailed derivation in integral of sin²x.
Example 5: Linear function 2x + 1 on [1, 5]
Find the average value of \( f(x) = 2x + 1 \) on ( [1, 5] ).
Evaluate the integral over ( [1, 5] ):
$$\int_1^5 (2x + 1) \, dx = \left[ x^2 + x \right]_1^5 = (25 + 5) - (1 + 1) = 30 - 2 = 28$$
Divide by the interval width \( 5 - 1 = 4 \):
$$f_{\text{avg}} = \frac{28}{4} = 7$$
Notice that taking the simple endpoint arithmetic mean yields \( \frac{f(1) + f(5)}{2} = \frac{3 + 11}{2} = 7 \). The average value of any straight line over ( [a, b] ) always equals its midpoint value \( f\left(\frac{a+b}{2}\right) \), because the region beneath a linear graph forms a trapezoid. This midpoint shortcut fails for non-linear functions.
Example 6: Function with negative net area on [-2, 1]
Find the average value of \( f(x) = x \) on ( [-2, 1] ).
Calculate the integral over ( [-2, 1] ):
$$\int_{-2}^1 x \, dx = \left[ \frac{x^2}{2} \right]_{-2}^1 = \frac{1}{2} - \frac{(-2)^2}{2} = \frac{1}{2} - 2 = -\frac{3}{2}$$
Divide by the length of the interval \( 1 - (-2) = 3 \):
$$f_{\text{avg}} = \frac{-\frac{3}{2}}{3} = -\frac{1}{2}$$
Because the region below the x-axis on ( [-2, 0] ) is larger than the region above the x-axis on ( [0, 1] ), the net signed area is negative, leading to a negative average value.
Example 7: Applied temperature modeling
Suppose outdoor temperature \( T(t) \) in degrees Fahrenheit \( t \) hours after 6:00 AM is modeled by:
$$T(t) = 60 + 10 \sin\left(\frac{\pi t}{12}\right)$$
To find the average temperature over the 12-hour daytime period ( [0, 12] ):
$$T_{\text{avg}} = \frac{1}{12 - 0} \int_0^{12} \left(60 + 10 \sin\left(\frac{\pi t}{12}\right)\right) \, dt$$
First, evaluate the two terms separately. The constant term integrates to \( 60 \cdot 12 = 720 \). For the sine term, apply u-substitution with \( u = \frac{\pi t}{12} \) and \( du = \frac{\pi}{12} dt \):
$$\int_0^{12} 10 \sin\left(\frac{\pi t}{12}\right) \, dt = 10 \cdot \frac{12}{\pi} \int_0^\pi \sin u \, du = \frac{120}{\pi} \left[-\cos u\right]_0^\pi = \frac{120}{\pi} (1 - (-1)) = \frac{240}{\pi}$$
Sum the integral components and divide by 12:
$$T_{\text{avg}} = \frac{1}{12} \left(720 + \frac{240}{\pi}\right) = 60 + \frac{20}{\pi} \approx 66.37^\circ\text{F}$$
The temperature ranges between 60°F at start/end and 70°F at peak (t = 6). The average value of ~66.37°F reflects that the profile spends more time near higher values than a simple straight line would.
Example 8: Rational and logarithmic function 1/x on [1, e]
Find the average value of \( f(x) = \frac{1}{x} \) on ( [1, e] ).
The interval length is \( e - 1 \). Also, calculate the integral using the integral of 1/x:
$$\int_1^e \frac{1}{x} \, dx = \left[ \ln|x| \right]_1^e = \ln(e) - \ln(1) = 1 - 0 = 1$$
Dividing by interval length gives:
$$f_{\text{avg}} = \frac{1}{e - 1} \approx 0.5820$$
Solving \( \frac{1}{c} = \frac{1}{e - 1} \) yields \( c = e - 1 \approx 1.7183 \), which lies inside ( [1, e] ).
Example 9: Symmetric parabolic arch 4 – x² on [-2, 2]
Calculate the average height of the parabolic region \( f(x) = 4 - x^2 \) on ( [-2, 2] ).
Because \( f(x) \) is an even function, evaluate the integral using symmetry over ( [0, 2] ):
$$\int_{-2}^2 (4 - x^2) \, dx = 2 \int_0^2 (4 - x^2) \, dx = 2 \left[ 4x - \frac{x^3}{3} \right]_0^2 = 2 \left( 8 - \frac{8}{3} \right) = 2 \left(\frac{16}{3}\right) = \frac{32}{3}$$
The interval width is \( 2 - (-2) = 4 \). Divide total area by width:
$$f_{\text{avg}} = \frac{\frac{32}{3}}{4} = \frac{8}{3} \approx 2.6667$$
To find where \( f(c) = f_{\text{avg}} \), solve \( 4 - c^2 = \frac{8}{3} \implies c^2 = \frac{4}{3} \implies c = \pm \frac{2}{\sqrt{3}} \approx \pm 1.1547 \). Both values, however, lie within ( [-2, 2] ).
Mean Value Theorem for integrals
The Mean Value Theorem for Integrals states that if \( f(x) \) is continuous on a closed interval ( [a, b] ), there exists at least one point \( c \) in ( [a, b] ) such that the function value at \( c \) equals the average value of the function over that interval:

$$f(c) = f_{\text{avg}} = \frac{1}{b - a} \int_a^b f(x) \, dx$$
Geometrically, this guarantees that the top edge of the equal-area rectangle intersects the graph of \( y = f(x) \) at least once inside the interval.
Rigorous Proofs
Proof 1 (Extreme Value Theorem & Intermediate Value Theorem): By the Extreme Value Theorem, a continuous function \( f \) on ( [a, b] ) attains an absolute minimum value \( m \) and an absolute maximum value \( M \) on ( [a, b] ). Thus, for all \( x \in [a, b] \):
$$m \le f(x) \le M$$
Integrating all three components across ( [a, b] ) yields:
$$\int_a^b m \, dx \le \int_a^b f(x) \, dx \le \int_a^b M \, dx$$
$$m(b - a) \le \int_a^b f(x) \, dx \le M(b - a)$$
Dividing by the positive interval width \( b - a \):
$$m \le \frac{1}{b - a} \int_a^b f(x) \, dx \le M \implies m \le f_{\text{avg}} \le M$$
By the Intermediate Value Theorem, a continuous function must attain every value between its minimum \( m \) and maximum \( M \). Therefore, there must exist some number \( c \in [a, b] \) such that \( f(c) = f_{\text{avg}} \).
Proof 2 (Fundamental Theorem of Calculus & Derivative MVT): Define an accumulation function \( F(x) = \int_a^x f(t) \, dt \). By the Fundamental Theorem of Calculus, \( F(x) \) is continuous on ( [a, b] ) and differentiable on \( (a, b) \). Also, \( F'(x) = f(x) \). Applying the derivative Mean Value Theorem to \( F(x) \) guarantees a point \( c \in (a, b) \) such that:
$$F'(c) = \frac{F(b) - F(a)}{b - a}$$
Substituting \( F'(c) = f(c) \), \( F(b) = \int_a^b f(t) \, dt \), and \( F(a) = 0 \) yields:
$$f(c) = \frac{1}{b - a} \int_a^b f(t) \, dt = f_{\text{avg}}$$
Comparing average value with related concepts
Students often confuse average function value with other calculus indicators. However, the table below summarizes key differences:
| Concept | Formula | Meaning / Output | Typical Units |
|---|---|---|---|
| Average Value of f(x) | \(\frac{1}{b-a}\int_a^b f(x)dx\) | Average height of function over interval | Same units as f(x) |
| Average Rate of Change of f(x) | \(\frac{f(b) - f(a)}{b - a}\) | Slope of the secant line connecting endpoints | \(\frac{\text{Units of } f(x)}{\text{Units of } x}\) |
| Root Mean Square (RMS) | \(\sqrt{\frac{1}{b-a}\int_a^b [f(x)]^2 dx}\) | Effective magnitude of oscillating signals | Same units as f(x) |
| Weighted Average of f(x) | \(\frac{\int_a^b f(x)w(x)dx}{\int_a^b w(x)dx}\) | Average with position-dependent density w(x) | Same units as f(x) |
The Fundamental Theorem of Calculus connects the first two concepts: the average rate of change of \( f \) on ( [a, b] ) equals the average value of its derivative \( f' \) on ( [a, b] ):
$$(f')_{\text{avg}} = \frac{1}{b - a} \int_a^b f'(x) \, dx = \frac{f(b) - f(a)}{b - a}$$
Real-world applications
- Kinematics & Physics: The average velocity of a moving object from \( t = a \) to \( t = b \) is the average value of its velocity function \( v(t) \). Because \( \int_a^b v(t) \, dt = s(b) - s(a) \) (change in position), \( v_{\text{avg}} = \frac{s(b) - s(a)}{b - a} \).
- Electrical Engineering: In alternating current (AC) circuits, the simple average value of a sinusoidal current over a full cycle is zero. However, engineers use Root Mean Square (RMS) voltage or current to measure delivered power.
- Pharmacology: When a patient receives a drug, its concentration in the bloodstream \( C(t) \) changes over time. The average drug concentration over a dosage window ( [0, T] ) is given by \( C_{\text{avg}} = \frac{1}{T} \int_0^T C(t) \, dt \), helping doctors determine effective dosage schedules.
- Economics: Average cost over a production level interval \( [q_1, q_2] \) is computed by integrating the marginal cost function \( C'(q) \) and dividing by \( q_2 - q_1 \).
When this formula does not apply
While the average value integral works for any integrable function, specific limitations apply:
- Discontinuous functions: If \( f(x) \) has jump discontinuities, the average value formula still computes a numeric mean height, but the Mean Value Theorem for integrals fails—the function may skip its average value and never equal \( f_{\text{avg}} \) at any point.
- Infinite intervals: Over unbounded intervals like \( [0, \infty\) ), dividing by \( \infty - 0 \) is undefined. Therefore, computing continuous averages over infinite intervals requires limit definitions or weighted probability density functions.
- Non-integrable singularities: Functions with unbounded vertical asymptotes inside ( [a, b] ) \(such as ( f(x) = \frac{1}{x^2} ) on ( [-1, 1] ) \) have divergent improper integrals and no finite average value.
Common mistakes and fixes
- Forgetting to divide by \( b - a \): Evaluating only \( \int_a^b f(x) \, dx \) yields total accumulated area, not average height. Always multiply by \( \frac{1}{b - a} \).
- Dividing by b instead of b − a: On ( [2, 6] ), the interval length is \( 6 - 2 = 4 \), not 6. Always subtract the lower bound from the upper bound.
- Averaging endpoints (f(a) + f(b))/2: Endpoint averaging produces correct results only for straight lines. Curved functions, however, require definite integration.
- Confusing average value with average rate of change: Average value uses \( \frac{1}{b-a} \int_a^b f(x) \, dx \). However, average rate of change uses \( \frac{f(b) - f(a)}{b - a} \).
- Keeping values of c outside [a, b]: When solving \( f(c) = f_{\text{avg}} \), discard any algebraic solutions that lie outside the target interval.
Average value calculator
Use the calculator below to compute definite integrals, calculate average function values, and identify 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 additional features and step-by-step solutions, visit the standalone average value calculator.
Practice problems
Test your knowledge with these problems before checking the step-by-step solutions below.

- Find the average value of \( f(x) = x^3 \) on ( [0, 2] ).
- Next, find the average value of \( f(x) = \cos x \) on \( [0, \frac{\pi}{2}] \).
- Find the average value of \( f(x) = \frac{1}{1 + x^2} \) on ( [0, 1] ).
- Also, find all values of \( c \) guaranteed by the Mean Value Theorem for integrals for \( f(x) = x^2 - 2x \) on ( [0, 3] ).
Solutions:
1. Integral: \( \int_0^2 x^3 \, dx = \left[\frac{x^4}{4}\right]_0^2 = 4 \). Next, divide by length \( 2 - 0 = 2 \): \( f_{\text{avg}} = \frac{4}{2} = 2 \).
2. Integral: \( \int_0^{\pi/2} \cos x \, dx = [\sin x]_0^{\pi/2} = 1 - 0 = 1 \). Then, divide by length \( \frac{\pi}{2} \): \( f_{\text{avg}} = \frac{1}{\pi/2} = \frac{2}{\pi} \).
3. Integral: \( \int_0^1 \frac{1}{1 + x^2} \, dx = [\arctan x]_0^1 = \frac{\pi}{4} - 0 = \frac{\pi}{4} \). After that, divide by length \( 1 - 0 = 1 \): \( f_{\text{avg}} = \frac{\pi}{4} \).
4. Integral: \( \int_0^3 (x^2 - 2x) \, dx = \left[\frac{x^3}{3} - x^2\right]_0^3 = (9 - 9) - 0 = 0 \). Next, divide by length 3: \( f_{\text{avg}} = 0 \). Setting \( c^2 - 2c = 0 \implies c(c - 2) = 0 \), yields \( c = 0 \) and \( c = 2 \). Both points lie within ( [0, 3] ).
Frequently asked questions
Is the average value of a function the same as (f(a) + f(b))/2?
No. Endpoint averaging \( \frac{f(a) + f(b)}{2} \) works only for linear functions ( straight lines ). For non-linear curves, however, the behavior of the function across the interior of the interval alters the true continuous mean. This requires definite integration.
Can the average value of a function be negative?
Yes. The definite integral measures net signed area. If a function spends more area below the x-axis than above it over ( [a, b] ), the integral is negative, resulting in a negative average value.
What is the difference between average value and average rate of change?
Average value measures the mean continuous height of a function \( f(x) \) using integration: \( \frac{1}{b-a}\int_a^b f(x) \, dx \). In contrast, average rate of change measures the slope of the secant line between interval endpoints using division: \( \frac{f(b) - f(a)}{b - a} \). By the Fundamental Theorem of Calculus, the average rate of change of \( f \) equals the average value of \( f' \).
Does a function have to be continuous to have an average value?
No. Any integrable function ( including functions with piecewise jump discontinuities ) has a well-defined average value. However, continuity is required for the Mean Value Theorem for integrals to guarantee that the function actually equals its average value at some point \( c \).
How does average value connect to statistics and probability?
The average value formula is the continuous analogue of the expected value in probability. If a continuous random variable \( X \) is uniformly distributed over ( [a, b] ), its probability density function is \( p(x) = \frac{1}{b - a} \). The expected value ( E[f(X)] ) is then given by \( \int_a^b f(x) p(x) \, dx = \frac{1}{b - a} \int_a^b f(x) \, dx \).
Further reading
- Average Function Value (Paul’s Online Math Notes) — formal definitions, proofs, and additional worked examples.
- The Definite Integral (OpenStax Calculus Volume 1) — comprehensive textbook coverage of definite integrals and mean value application.
Calculators for this topic
Keep learning
Velocity, Acceleration and Displacement: Formulas and Graphs
Velocity, acceleration and displacement explained: average and instantaneous formulas, motion graphs, calculus links and worked examples.
Projectile Motion: Equations, Range and Max Height
Projectile motion explained: velocity components, time of flight, range, maximum height and the parabolic path, with calculus derivations and examples.

