Calculus Calculator
Find the numerical derivative or definite integral of any function f(x), with a live plot. This tool computes numerically, not symbolically — see the note below.
Calculator verified • Last updated: August 2026
Not sure? Click here.
- Derivative — use this to find the instantaneous rate of change (the slope of the tangent line) of f(x) at one specific point.
- Definite Integral — use this to find the accumulated signed area between f(x) and the x-axis over an interval [a, b].
Function Plot
The blue curve is f(x). In derivative mode, the orange line is the tangent at your chosen point — its slope is the derivative. In integral mode, the shaded region is the area being computed.
The definite integral is always measured relative to the x-axis (the line y = 0), not toward any other reference line — this is the standard calculus definition (see Stewart, Calculus, "Area Between Curves"). So if f(x) dips below the x-axis, that portion counts as negative area and subtracts from the total: the result is a signed area, not a physical, always-positive one. If what you actually want is the geometric area under a curve that sits away from zero, or between a curve and some other baseline, shift the function first — e.g. compute g(x) = f(x) − c to measure area above a baseline at y = c — or narrow the limits a and b to just the sub-interval you care about, rather than integrating the raw f(x) over the full range.
Numerical Calculus Explained
This calculator estimates derivatives and integrals numerically — by direct computation on many nearby points — rather than deriving a symbolic formula the way a calculus textbook would.
Derivative (central difference):
f'(x): the estimated derivative (instantaneous rate of change) at x.
x: the point at which the derivative is evaluated.
h: a small step size used to sample points just before and after x.
Definite integral (Simpson's rule):
a, b: the lower and upper bounds of the interval being integrated over.
n: the number of subintervals the range is split into (must be even for Simpson's rule).
h: the width of each subinterval, equal to (b − a)/n.
x0, x1, …, xn: the sample points spaced h apart across [a, b].
Central difference estimates the slope using points symmetrically on either side of , canceling out much of the error a one-sided estimate would have. Simpson's rule fits a parabola through each pair of adjacent slices, giving a far more accurate area estimate than simply summing rectangles.
Function Syntax Guide
Write f(x) using standard math notation — a few rules to avoid parse errors:
x^2,x^3— use^for exponents, not**.2*x, not2x— multiplication needs an explicit*.sin(x),cos(x),tan(x),asin,acos,atan— trig functions, argument in radians.exp(x)for e to the power of x,ln(x)for natural log,log(x)for base-10 log.sqrt(x)andabs(x)— square root and absolute value.piandeare recognized as constants.- Example:
sqrt(x^2+1)
Worked Example: Derivative of a Trig-Polynomial Product
Using the calculator's default function, , evaluated at — the numerical derivative comes out to approximately 2.2232. Checking against the symbolic answer via the product rule, , gives — matching to four decimal places, well within the tiny error the central-difference method introduces at this step size.
Why Numerical Methods Matter
Not every function has a convenient closed-form derivative or antiderivative — many real functions encountered in engineering, statistics, and data analysis simply can't be integrated symbolically at all. Numerical methods sidestep this entirely: they work identically whether the function is simple or has no symbolic antiderivative, which is exactly why they're the default approach in most scientific computing software, not just a fallback for hard cases.
A Brief History of Numerical Calculus
Isaac Newton himself developed early numerical integration techniques in the 17th century alongside his symbolic calculus work, recognizing that many practical problems (like planetary orbit calculations) required numeric approximation rather than exact formulas. Thomas Simpson's rule, published in 1743, remains one of the most widely taught numerical integration methods today, prized for reaching high accuracy with relatively few function evaluations compared to simpler approaches like the trapezoidal rule.
Common Numerical Calculus Mistakes
Choosing a step size that's too large is a common error for derivatives — a large misses fine curve detail and gives a systematically biased slope estimate. Choosing a step size that's absurdly tiny can paradoxically also hurt accuracy, since floating-point rounding error starts to dominate when subtracting two nearly-equal numbers. Using an odd number of intervals with Simpson's rule (which requires an even number) is a common integral-side mistake — this calculator handles that automatically, but it's worth knowing if you ever implement the method by hand.
Calculus Terms You Should Know
Derivative — the instantaneous rate of change of a function, geometrically the slope of its tangent line.
Definite Integral — the signed area between a curve and the x-axis over a specific interval.
Central Difference — a numerical derivative estimate using points on both sides of the target, more accurate than a one-sided estimate.
Simpson's Rule — a numerical integration method that fits parabolas through slices of the curve for higher accuracy than simple rectangles.
This calculator computes numerically — it does not produce a symbolic formula for the derivative or antiderivative. Results near discontinuities, sharp corners, or asymptotes may be less accurate.
Frequently Asked Questions
Is this calculator doing symbolic or numerical calculus?
Numerical only — it never derives an algebraic formula for the derivative or antiderivative. Instead it estimates the derivative by evaluating your function at two nearby points and computing the slope between them, and estimates the integral by adding up many thin slices under the curve (Simpson's rule). This gives an accurate numeric answer at a specific point or over a specific interval, but not a general formula valid everywhere.
How accurate is a numerical derivative or integral?
Very accurate for smooth, well-behaved functions — the central difference method used here for derivatives and Simpson's rule for integrals both converge quickly as the step size shrinks or the number of intervals grows, typically matching the true calculus answer to many decimal places. Accuracy can suffer near sharp corners, discontinuities, or asymptotes, where the function doesn't behave smoothly.
What functions and operators can I use in f(x)?
Standard arithmetic (+, -, *, /, ^ for exponents), parentheses for grouping, and common functions: sin, cos, tan, asin, acos, atan, exp, ln, log (base 10), sqrt, and abs. Use x as the variable — for example, sin(x)*exp(-x/5) or sqrt(x^2+1) are both valid.