Derivative & Integral Calculator
Numeric derivatives and Simpson's-rule integrals for any f(x).
Try: x^3 - 2x, sin(x), e^x, ln(x). log is base-10, ln is base-e.
Derivative at a point
Definite integral
How the answers were found
How to use the derivative & integral calculator
- Type f(x) — for example
x^2orsin(x). - Set the point x to get the slope (derivative) there.
- Set the bounds a and b and n to get the area (definite integral) — n = 100 is plenty; raise it to watch the value settle.
- Read the method notes under the answers — they show the h and n actually used and the arithmetic.
Frequently asked questions
How is the derivative computed?
With the central difference formula f′(x) ≈ (f(x+h) − f(x−h)) / 2h, using h = 0.00001. Sampling symmetrically around the point cancels the leading error term, making it much more accurate than a one-sided slope.
How is the integral computed?
With composite Simpson's rule: the interval is split into n even subintervals, and the area is approximated by fitting a parabola through each triple of points. Doubling n roughly quarters the error — try n = 100 vs n = 1000.
Why numeric instead of symbolic calculus?
Numeric methods work on any function you can type — including ones with no closed-form derivative or antiderivative — and they're accurate to about 8+ digits for smooth functions, which is plenty for checking homework.
What can I type as f(x)?
The variable x, the operators + − * / ^ with parentheses, the functions sin, cos, tan, sqrt, cbrt, ln, log, abs, exp, and the constants pi and e. log is base-10; ln is the natural log.
What if the function has a gap between the bounds?
The calculator detects it and says so plainly instead of returning a wrong number — for example, integrating 1/x across 0 has no finite answer, so you'll get an explanation, not NaN.
More from the codex
Derivative & Integral Calculator
Numeric derivatives and Simpson's-rule integrals.
Graphing Calculator
Plot up to 3 functions with pan and zoom.
Open tool → LiveMatrix Calculator
Add, multiply, invert matrices up to 4×4.
Open tool → LiveSystem of Equations Solver
Solve 2×2 and 3×3 systems step by step.
Open tool → LiveTriangle Solver
SSS, SAS, ASA, AAS with diagram.
Open tool → LivePythagorean Calculator
Solve any side of a right triangle.
Open tool → LiveCircle Calculator
Radius, diameter, circumference, area from any one.
Open tool → LiveArea & Volume Calculator
Areas and surface/volume for common shapes.
Open tool → LiveSlope Calculator
Slope and line equation from two points, graphed.
Open tool → LiveDistance Calculator
2D/3D distance and midpoint.
Open tool → LiveBitwise Calculator
AND, OR, XOR, NOT, shifts in binary/hex.
Open tool → LiveHalf-Life Calculator
Decay math plus a decay chart.
Open tool → LiveScientific Calculator
Trig, logs, powers, roots, and factorials — with degrees/radians, memory, and history.
Open tool → LiveQuadratic Solver
Roots, vertex, discriminant, factored form, and every solution step.
Open tool →Support the codex
This tool is free, with no account and no ads. If it saved you some time, consider supporting the indie dev behind it.