Instant Partial Derivative Calculator
Evaluate numerical partial derivatives for a two-variable function f(x, y) at a specific point using the central-difference method.
x and y. Supported functions: sin, cos, tan, log, sqrt, exp, abs. Use ^ for powers (e.g., x^3).What Is a Partial Derivative?
A partial derivative tells you how a multivariable function changes when you vary one input while holding the others fixed. If your function is f(x, y), then:
∂f/∂xmeasures change in thex-direction whileyis constant.∂f/∂ymeasures change in they-direction whilexis constant.
This concept appears everywhere: optimization, machine learning gradients, economics sensitivity analysis, thermodynamics, and engineering design.
How This Calculator Works
This tool computes derivatives numerically using the central-difference approximation, which is generally more accurate than one-sided differences for smooth functions.
Formulas Used
∂f/∂x ≈ [f(x+h, y) - f(x-h, y)] / (2h)∂f/∂y ≈ [f(x, y+h) - f(x, y-h)] / (2h)
You control h, the step size. A very large h can reduce accuracy; a very tiny h can introduce floating-point noise. The default h = 1e-5 works well for many functions.
Input Format Guide
Use Standard Math Syntax
- Multiplication must be explicit: write
2*x, not2x. - Use
^for powers:x^2,(x+y)^3. - Use parentheses for grouping.
Functions and Constants
- Functions:
sin,cos,tan,asin,acos,atan,sqrt,log,ln,exp,abs,pow. - Constants:
piande.
sqrt(x-y) or log(x)), make sure your chosen point and nearby values stay valid. Numerical derivatives evaluate points slightly around your input.
Worked Examples
Example 1: f(x,y)=x^2*y + sin(x*y) at (1,2)
Set x=1, y=2, and choose “Both (gradient).” The calculator returns approximate values for ∂f/∂x and ∂f/∂y at that point.
Example 2: f(x,y)=exp(x*y)+x^3-y^2
Great for seeing how exponential growth and polynomial terms combine. Try different points and observe how sensitivity changes dramatically across the surface.
Common Mistakes to Avoid
- Typing
2xinstead of2*x. - Using an invalid point (e.g.,
log(x)near non-positive values). - Choosing a step size
hthat is too large or negative. - Forgetting that this calculator is numerical, not symbolic.
Why Numerical Partial Derivatives Matter
Even when symbolic differentiation is available, numerical derivatives are valuable for quick checks, black-box models, simulation outputs, and data-driven functions where algebraic formulas are difficult to manipulate directly.
If you are learning multivariable calculus, this tool also helps you build intuition: move around a surface and see how each direction changes independently.