Integral Calculator: Compute Definite and Indefinite Integrals
Integration is the inverse operation of differentiation and a fundamental tool in calculus. It computes the area under a curve, the accumulated quantity from a rate of change, and the antiderivative of a function. Our Integral Calculator computes both definite integrals (with bounds) and indefinite integrals, showing step-by-step solutions using standard integration techniques. Use our Integral Calculator to estimate your costs.
What Is an Integral?
A definite integral ∫f(x)dx from a to b represents the signed area under the curve f(x) between x = a and x = b. An indefinite integral ∫f(x)dx represents the family of antiderivatives of f(x), written as F(x) + C where C is the constant of integration.
The Fundamental Theorem of Calculus connects differentiation and integration: if F(x) is the antiderivative of f(x), then ∫f(x)dx from a to b = F(b) - F(a). This means you can compute areas by finding antiderivatives.
Using the Integral Calculator
Enter your function using standard mathematical notation. For definite integrals, enter the lower and upper bounds. The calculator shows the integral, the step-by-step integration process, and the final result. Techniques supported include power rule, substitution (u-substitution), integration by parts, trigonometric integrals, and partial fractions.
The calculator also shows a shaded graph of the area being calculated for definite integrals, helping you visualize the region whose area you are computing.
Integration Techniques
Power Rule for Integration
∫x^n dx = x^(n+1)/(n+1) + C, for n ≠ -1. Example: ∫x³ dx = x^4/4 + C. For n = -1: ∫1/x dx = ln|x| + C.
U-Substitution
Used when the function contains a composition. Substitute u = g(x), du = g'(x)dx. Example: ∫2x × cos(x²)dx. Let u = x², du = 2x dx. The integral becomes ∫cos(u)du = sin(u) + C = sin(x²) + C.
Integration by Parts
Used for products of functions: ∫u dv = uv - ∫v du. Example: ∫x × e^x dx. Let u = x, dv = e^x dx. Then du = dx, v = e^x. Result: x × e^x - ∫e^x dx = x × e^x - e^x + C = e^x(x - 1) + C.
Applications of Integration
- Area calculation: Find the area between curves, under a curve, or bounded by functions. Used in geometry, physics, and engineering.
- Volume of revolution: Rotate a function around an axis to find the volume of the resulting solid. Disk and shell methods are both supported.
- Physics: Integrate velocity to get position, acceleration to get velocity, force over distance to get work, and charge flow to get total charge.
- Probability: Integrate probability density functions to find cumulative probabilities and expected values.
- Economics: Integrate marginal cost to get total cost, marginal revenue to get total revenue, and calculate consumer and producer surplus.
Real-World Example
Find the area under f(x) = x² from x = 1 to x = 3:
- Indefinite integral: ∫x² dx = x³/3 + C
- Definite integral: ∫₁³ x² dx = [x³/3]₁³ = (27/3) - (1/3) = 9 - 0.333 = 8.667
- Area: 8.667 square units
This could represent the total distance traveled if x² represents velocity over time, the total cost if x² represents marginal cost, or the accumulated growth if x² represents a growth rate.
Start Calculating
Use our Integral Calculator below to compute integrals and understand accumulated change. Also check our Derivative Calculator for rates of change and our Area Calculator for geometric area calculations.
Why Simpson's Rule Gives the Answer
This calculator does not try to find a symbolic antiderivative. It evaluates your function at many points across the interval and applies the composite Simpson's rule, which fits a quadratic curve through each pair of subintervals and integrates those quadratics exactly. The formula is (h/3) times [f(a) + 4∑f(odd) + 2∑f(even) + f(b)], where h is the width of one subinterval.
See it work by hand with just 4 subintervals on f(x) = x² from 0 to 2. With n = 4, h = 0.5. The odd-index values are f(0.5) = 0.25 and f(1.5) = 2.25, summing to 2.5; the even-index value is f(1) = 1.0; the endpoints are f(0) = 0 and f(2) = 4. The result is (0.5/3) × (0 + 4×2.5 + 2×1 + 4) = (0.5/3) × 16 = 2.6667, which equals the exact answer 8/3. Simpson's rule is exact for any polynomial of degree 3 or less, which is why the default example matches the analytic result perfectly even with a modest subinterval count.
- Use the correct notation: "x^2" for powers, "sin(x)", "cos(x)", "tan(x)" for trigonometry, "ln(x)" for natural log, "log(x)" for base-10 log, "sqrt(x)" for square roots, and "pi" for π. The caret ^ is the power operator in every example field.
- The number of subintervals n must be even for Simpson's rule; if you enter an odd value, the calculator rounds it up to the next even number before computing.
- Increase n to reduce error. The error term is on the order of h to the fourth power, so doubling n shrinks the error by roughly a factor of 16 — going from 100 to 1,000 subintervals makes a dramatic difference on steep curves.
- The lower bound must be smaller than the upper bound, and the function must be defined everywhere between them; a function with a discontinuity inside the interval produces a warning rather than a result.
Related Calculators
Use our Integral Calculator Guide together with related tools such as Area Calculator, Combination Calculator, Derivative Calculator to plan more accurately. Each calculator runs instantly in your browser with step-by-step guidance.
Written by the CalcMaster Pro Editorial Team — financial, health, and DIY tools reviewed for accuracy. All calculators run on standard, widely accepted formulas. Always confirm final numbers with a qualified professional for decisions that require official figures.