Area Under Curve Calculator Formula

Understand the math behind the area under curve calculator. Each variable explained with a worked example.

Formulas Used

Area

area = n != -1 ? abs((coeff / (n + 1)) * (pow(x2, n + 1) - pow(x1, n + 1))) : 0

Y At X1

y_at_x1 = coeff * pow(x1, n)

Y At X2

y_at_x2 = coeff * pow(x2, n)

Avg Value

avg_value = x2 != x1 && n != -1 ? abs((coeff / (n + 1)) * (pow(x2, n + 1) - pow(x1, n + 1))) / abs(x2 - x1) : 0

Variables

VariableDescriptionDefault
coeffCoefficient (a)1
nExponent (n)2
x1Left Bound (x₁)0
x2Right Bound (x₂)4

How It Works

Area Under a Curve

Definite Integral

The area under y = ax^n from x₁ to x₂ is:

Area = |integral from x₁ to x₂ of ax^n dx|

= |(a/(n+1)) × [x₂^(n+1) - x₁^(n+1)]|

Average Value

The average value of f on [x₁, x₂] is:

f_avg = (1/(x₂ - x₁)) × integral of f(x) dx

Worked Example

Find the area under y = x² from x = 0 to x = 4.

coeff = 1n = 2x1 = 0x2 = 4
  1. 01Antiderivative: x³/3
  2. 02F(4) = 64/3 ≈ 21.3333
  3. 03F(0) = 0
  4. 04Area = 21.3333 - 0 = 21.3333
  5. 05Average value = 21.3333 / 4 ≈ 5.3333

Ready to run the numbers?

Open Area Under Curve Calculator