Average Value of a Function

Find the mean height of a function over an interval with the average value formula; use it for real-world average rates of change over time.

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

Solve a problem with Average Value of a Function

Type the problem. The solver will use Average Value of a Function where Average Value of a Function is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Average Value of a Function takes
ff
aa
bb
xx
Average Value of a Function
SymbolMeaning
ffThe function whose average value you are finding; ff must be defined and integrable on the interval [a,b][a, b].
aaThe left endpoint of the interval over which you are averaging; aa should be less than bb, and both must be in the domain of ff.
bbThe right endpoint of the interval; represents the upper bound of your averaging interval.
xxThe variable of integration, representing position along the horizontal axis; it ranges from aa to bb inside the integral.

When to use it

Use this when you need to find the average height or average output of a function over a given interval.

Level

Usually taught in: Calculus I · Appears on: AP Calculus

Worked examples

1. Average value of a linear function

Problem

Find the average value of f(x)=2x+1f(x) = 2x + 1 on the interval [0,3][0, 3].
  1. favg=13003(2x+1)dx=1303(2x+1)dxf_{\text{avg}} = \frac{1}{3-0}\int_0^3 (2x+1)\,dx = \frac{1}{3}\int_0^3 (2x+1)\,dx

    Substitute a=0a=0 and b=3b=3 into the formula; the interval width is 30=33-0=3.

  2. 03(2x+1)dx=[x2+x]03\int_0^3 (2x+1)\,dx = [x^2 + x]_0^3

    Integrate term by term: 2xdx=x2\int 2x\,dx = x^2 and 1dx=x\int 1\,dx = x.

  3. [x2+x]03=(32+3)(02+0)=120=12[x^2 + x]_0^3 = (3^2 + 3) - (0^2 + 0) = 12 - 0 = 12

    Evaluate the antiderivative at the upper limit x=3x=3 and subtract its value at x=0x=0.

  4. favg=1312=4f_{\text{avg}} = \frac{1}{3} \cdot 12 = 4

    Multiply the integral by the reciprocal of the interval width to get the average value.

Answer: favg=4f_{\text{avg}} = 4

The average value is 4, which is the constant height a rectangle under the curve from x=0x=0 to x=3x=3 would need to have the same area as the actual region. Since f(0)=1f(0) = 1 and f(3)=7f(3) = 7, the average of 4 lies appropriately between these boundary values.

2. Average value with negative regions and fractions

Problem

Find the average value of f(x)=x22xf(x) = x^2 - 2x on [1,2][-1, 2].
  1. favg=12(1)12(x22x)dx=1312(x22x)dxf_{\text{avg}} = \frac{1}{2-(-1)}\int_{-1}^2 (x^2-2x)\,dx = \frac{1}{3}\int_{-1}^2 (x^2-2x)\,dx

    The interval width is 2(1)=32 - (-1) = 3; note that the lower limit is negative.

  2. 12(x22x)dx=[x33x2]12\int_{-1}^2 (x^2-2x)\,dx = \left[\frac{x^3}{3} - x^2\right]_{-1}^2

    Apply the power rule: x2dx=x33\int x^2\,dx = \frac{x^3}{3} and 2xdx=x2\int -2x\,dx = -x^2.

  3. [x33x2]12=(834)(131)=4343=0\left[\frac{x^3}{3} - x^2\right]_{-1}^2 = \left(\frac{8}{3} - 4\right) - \left(\frac{-1}{3} - 1\right) = \frac{-4}{3} - \frac{-4}{3} = 0

    At x=2x=2: 83123=43\frac{8}{3} - \frac{12}{3} = \frac{-4}{3}; at x=1x=-1: 1333=43\frac{-1}{3} - \frac{3}{3} = \frac{-4}{3}; subtracting gives 0.

  4. favg=130=0f_{\text{avg}} = \frac{1}{3} \cdot 0 = 0

    The regions where the function is negative and positive have equal signed area, so they cancel.

Answer: favg=0f_{\text{avg}} = 0

An average value of 0 is valid and occurs when the signed area above the xx-axis equals the signed area below. The parabola f(x)=x(x2)f(x) = x(x-2) dips below the axis between x=0x=0 and x=2x=2 while being positive for x<0x < 0, and these regions balance exactly.

3. Average width of a rectangular garden plot

Problem

A vegetable garden is rectangular with length 12 meters. The width varies along the length according to w(x)=40.2xw(x) = 4 - 0.2x meters, where xx is the distance along the length. Find the average width of the garden.
  1. favg=1120012(40.2x)dx=112012(40.2x)dxf_{\text{avg}} = \frac{1}{12-0}\int_0^{12} (4 - 0.2x)\,dx = \frac{1}{12}\int_0^{12} (4 - 0.2x)\,dx

    The garden extends from x=0x=0 to x=12x=12 meters; the interval width is 12.

  2. 012(40.2x)dx=[4x0.1x2]012\int_0^{12} (4 - 0.2x)\,dx = [4x - 0.1x^2]_0^{12}

    Integrate: 4dx=4x\int 4\,dx = 4x and 0.2xdx=0.1x2\int -0.2x\,dx = -0.1x^2.

  3. [4x0.1x2]012=(4120.1144)0=4814.4=33.6[4x - 0.1x^2]_0^{12} = (4 \cdot 12 - 0.1 \cdot 144) - 0 = 48 - 14.4 = 33.6

    At x=12x=12: 4(12)0.1(144)=4814.4=33.64(12) - 0.1(144) = 48 - 14.4 = 33.6; at x=0x=0: both terms are zero.

  4. favg=11233.6=2.8f_{\text{avg}} = \frac{1}{12} \cdot 33.6 = 2.8

    Divide the total integral by the garden length to find the average width.

Answer: favg=2.8 metersf_{\text{avg}} = 2.8 \text{ meters}

The average width is 2.8 meters. At the start (x=0x=0), the width is 4 meters; at the end (x=12x=12), it is 1.6 meters. The average of 2.8 meters correctly reflects the linear taper across the garden and tells you the constant width a rectangular garden would need to have the same total area.

Common mistakes

Where Average Value of a Function usually goes wrong
Answer came out wrong
Writing favg=abf(x)dxf_{\text{avg}} = \int_a^b f(x)\,dx without the factor 1ba\frac{1}{b-a}.
Always use the complete formula: favg=1baabf(x)dxf_{\text{avg}} = \frac{1}{b-a}\int_a^b f(x)\,dx.
Computing the definite integral correctly but forgetting to multiply by 1ba\frac{1}{b-a}, leaving the answer as just the integral value.
After calculating abf(x)dx\int_a^b f(x)\,dx, divide the result by (ba)(b-a): favg=abf(x)dxbaf_{\text{avg}} = \frac{\int_a^b f(x)\,dx}{b-a}.
Swapping the limits so that a>ba > b, then treating the negative result as a sign of error rather than accepting it as valid.
Always order so a<ba < b (left endpoint before right endpoint); if you discover limits are backwards, negate your answer or re-read the problem statement.
The mistakeWhy it is wrongThe fix
Writing favg=abf(x)dxf_{\text{avg}} = \int_a^b f(x)\,dx without the factor 1ba\frac{1}{b-a}.The integral alone gives total accumulation or signed area, not an average; dividing by interval width is what scales the total down to a mean value.Always use the complete formula: favg=1baabf(x)dxf_{\text{avg}} = \frac{1}{b-a}\int_a^b f(x)\,dx.
Computing the definite integral correctly but forgetting to multiply by 1ba\frac{1}{b-a}, leaving the answer as just the integral value.The antiderivative evaluated at the endpoints gives cumulative change or area; you must scale by the reciprocal of the interval width to convert this to a true average.After calculating abf(x)dx\int_a^b f(x)\,dx, divide the result by (ba)(b-a): favg=abf(x)dxbaf_{\text{avg}} = \frac{\int_a^b f(x)\,dx}{b-a}.
Swapping the limits so that a>ba > b, then treating the negative result as a sign of error rather than accepting it as valid.Reversing the limits of integration flips the sign of the result; the average value formula assumes a<ba < b, and swapping without adjustment inverts your final answer.Always order so a<ba < b (left endpoint before right endpoint); if you discover limits are backwards, negate your answer or re-read the problem statement.

Tips and when to use something else

  • The average value has the same units as the function's output, not the same units as area; this is why dividing by interval width is necessary.
  • If a function is symmetric about the midpoint of an interval (for example, f(x)=xf(x) = x on [a,a][-a, a]), the average value is zero because positive and negative regions cancel out.
  • For a linear function f(x)=mx+cf(x) = mx + c on an interval [a,b][a, b], the average value always equals the function's value at the midpoint x=a+b2x = \frac{a+b}{2}; use this as a quick check.
  • When a problem asks for average rate of change, use f(b)f(a)ba\frac{f(b)-f(a)}{b-a} or the Mean Value Theorem instead; this is different from average value and does not require integration.

Frequently asked questions

How is average value of a function different from average rate of change?
Average rate of change uses f(b)f(a)ba\frac{f(b)-f(a)}{b-a} and measures the slope of a secant line connecting two points. Average value of a function uses integration to find the mean height of the curve across the entire interval. Both involve aa and bb, but they measure different things.
Can the average value be negative?
Yes, if the function is negative (below the xx-axis) over the entire interval, or if the total signed area below the axis exceeds the area above it, the average value will be negative. This simply means the average height is below the xx-axis.
What if the function is not continuous on [a,b][a, b]?
The average value formula requires the function to be integrable. If there are jump discontinuities or severe singularities, the integral may not exist or may be improper. Always verify that ff is continuous, or at least piecewise continuous with finitely many breaks, before applying the formula.
Does the average value always lie between the minimum and maximum values of the function on the interval?
Yes, by the Mean Value Theorem for integrals. If mm and MM denote the minimum and maximum values of ff on [a,b][a, b], then mfavgMm \le f_{\text{avg}} \le M. The average value is always trapped within the function's range on that interval.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18