Average Value Calculator

  • Free
  • No sign-up
  • Works on phones
  • Shows the working
Integral#15

Average Value of a Function

\(f_{\text{avg}} = \frac{1}{b - a}\int_a^b f(x)\,dx\)

This average value of a function calculator finds the mean height of \( f(x) \) over an interval \( [a, b] \). Enter the function and the endpoints, and it returns the definite integral, the average value \( f_{\text{avg}} \), and the x-values \( c \) where the function actually reaches that average.

It is useful for calculus homework, for checking the Mean Value Theorem for integrals, and for practical averages such as mean temperature or mean speed over time. Free, no sign-up.

How to use the average value calculator

  1. Enter \( f(x) \). Use ^ for powers, sqrt(), sin(), ln(), e^(x) and pi. Implicit multiplication works: 3x^2, x e^x, 10 sin(pi x/12).
  2. Enter the interval endpoints \( a \) and \( b \), with \( a < b \). Values like pi or 2pi are fine.
  3. Press Average.
  4. Read three results: \( \int_a^b f(x)\,dx \), the average value \( f_{\text{avg}} \), and the point or points \( c \) with \( f(c) = f_{\text{avg}} \).

Formula

The average value of \( f \) on \( [a, b] \) is the integral divided by the length of the interval:

$$f_{\text{avg}} = \frac{1}{b - a} \int_a^b f(x)\,dx$$

Think of it as the height of a rectangle on \( [a, b] \) with the same area as the region under the curve. It is the continuous version of “add up the values and divide by how many there are”.

If \( f \) is continuous, the Mean Value Theorem for integrals guarantees at least one \( c \) in \( [a, b] \) with \( f(c) = f_{\text{avg}} \). The calculator searches the interval and lists such points. See the average value guide for the geometric picture and the Mean Value Theorem for why \( c \) must exist.

Worked examples

Example 1. Find the average value of \( f(x) = 3x^2 - 2x \) on \( [0, 2] \), and the point where it is attained.

The integral is

$$\int_0^2 (3x^2 - 2x)\,dx = \left[x^3 - x^2\right]_0^2 = 8 - 4 = 4$$

Divide by the length \( b - a = 2 \): \( f_{\text{avg}} = 2 \).

Now solve \( 3c^2 - 2c = 2 \), that is \( 3c^2 - 2c - 2 = 0 \). The quadratic formula gives \( c = \frac{1 \pm \sqrt{7}}{3} \). Only the plus sign lands inside \( [0, 2] \):

$$c = \frac{1 + \sqrt{7}}{3} \approx 1.21525$$

Type 3x^2 - 2x with limits 0 and 2 in the calculator above: it shows the integral 4, the average 2, and \( c \approx 1.2152504 \).

Example 2 (a real average). A room’s temperature in degrees Fahrenheit over 12 hours is modeled by \( T(t) = 60 + 10\sin\left(\frac{\pi t}{12}\right) \). What is the average temperature?

The calculator uses \( x \), so enter 60 + 10 sin(pi x/12) on \( [0, 12] \). By hand, \( \int_0^{12} \sin\left(\frac{\pi t}{12}\right) dt = \frac{24}{\pi} \), so

$$T_{\text{avg}} = \frac{1}{12}\left(720 + \frac{240}{\pi}\right) = 60 + \frac{20}{\pi} \approx 66.37$$

The average is about 66.37 °F, well below the 70 °F peak, because the temperature spends most of the time below its maximum.

Common mistakes

  • Forgetting to divide by \( b - a \). The integral alone, which is what the definite integral calculator returns, is the total (area), not the average.
  • Averaging the endpoint values. \( \frac{f(a) + f(b)}{2} \) is only the average for straight lines. In Example 1 it would give 4, not 2.
  • Confusing it with average rate of change. \( \frac{f(b) - f(a)}{b - a} \) is the average slope, a different quantity, and it is the one the mean value theorem calculator works with.
  • Expecting a positive answer. Parts of the graph below the x-axis pull the average down. For \( x^3 \) on \( [-1, 1] \), the average value is 0 by symmetry.

Related guides

Further reading

FAQ

How do you find the average value of a function?

Integrate \( f \) from \( a \) to \( b \) and divide by \( b - a \). The calculator shows both the integral and the result.

What does the value c mean?

It is a point in the interval where the function equals its average value. The Mean Value Theorem for integrals guarantees at least one such point for a continuous function; there can be several.

Can the average value of a function be negative?

Yes. If more of the graph lies below the x-axis than above it (weighted by area), the average is negative.

Is the average value calculator free to use?

Yes. It is free, works in any browser and needs no account.

Embed this calculator on your website

Teachers, tutors and bloggers are welcome to use this calculator for free. Copy the code below and paste it into any page (in WordPress, use a "Custom HTML" block). The small script makes the calculator grow to fit its answer; if your site removes scripts, it still works at a fixed height. Please keep the credit link.

More calculators

See all calculators