Skip to content
MoneyDeck

Partial Derivative Calculator

Differentiate f(x, y, z) with respect to any variable and evaluate it

Updated · Free, no signup

Use x, y and z. Supports ^, sqrt, sin, cos, tan, exp, ln, log10, abs, pi, e.

Partial derivative

y * (2x + cos(x * y))

Value at the point

3.16770633

f at the point

2.90929743

∂f/∂x at point

3.16770633

∂f/∂y at point

0.58385316

∂f/∂z at point

0

Gradient magnitude |∇f|

3.22106316

Gradient ∇f

(3.1677063, 0.58385316, 0)
  • ∂f/∂x = y * (2x + cos(x * y))
  • At (1, 2, 0) it equals 3.167706327.

All first partial derivatives

PartialExpressionValue at point
∂f/∂xy * (2x + cos(x * y))3.167706327
∂f/∂yx^2 + x * cos(x * y)0.5838531635
∂f/∂z00

About the Partial Derivative Calculator

This partial derivative calculator differentiates a function of several variables — x, y and z — with respect to the variable you choose, treating every other variable as a constant. Enter a function such as x^2·y + sin(x·y) or e^(x·z) + y^3 and it returns the symbolic partial derivative, then evaluates it at a point.

You can also take a second partial derivative, either pure (∂²f/∂x²) or mixed — for example fxy, which differentiates by x first and then by y and is written ∂²f/∂y∂x in Leibniz notation (the variable applied first sits on the right). Alongside the main answer it reports the gradient vector ∇f = (∂f/∂x, ∂f/∂y, ∂f/∂z) at your point and its length, which is the steepest rate of increase of the function there.

It is aimed at multivariable calculus students, and at engineers, economists and physicists who need marginal rates, sensitivities or gradients. Use ln() for the natural logarithm; trigonometric functions use radians. A function of only x and y works fine — the z value is simply ignored.

How to use the partial derivative calculator

  1. 1Type the function using x, y and z, e.g. x^2*y + sin(x*y).
  2. 2Choose which variable to differentiate with respect to.
  3. 3Optionally choose a second variable for a second or mixed partial.
  4. 4Enter the point (x, y, z) at which to evaluate.
  5. 5Read the symbolic partial, its value, and the gradient at that point.

Formula and method

∂f/∂x = lim(h→0) [f(x + h, y, z) − f(x, y, z)] ÷ h · ∇f = (∂f/∂x, ∂f/∂y, ∂f/∂z)

A partial derivative measures how a multivariable function changes when only one input moves and the others are held fixed. To find ∂f/∂x you differentiate with the usual rules — power, product, quotient and chain — while treating y and z as constants; ∂f/∂y and ∂f/∂z work the same way.

Second-order partials differentiate again: ∂²f/∂x² repeats the same variable, while the mixed partial fxy = (fx)y = ∂²f/∂y∂x differentiates by x and then by y — in subscript notation the order reads left to right, in Leibniz notation right to left. For functions with continuous second derivatives the mixed partials are equal in either order. The gradient collects the first partials into a vector that points in the direction of steepest increase; its magnitude is that steepest slope.

∂f/∂x
Rate of change of f as x changes, y and z fixed
fxy = ∂²f/∂y∂x
Mixed second partial: differentiate by x, then by y
∇f
Gradient vector of all first partials
|∇f|
Length of the gradient (steepest slope)

Worked examples

∂f/∂x of x²y + sin(xy) at (1, 2)

Holding y fixed, ∂f/∂x = 2xy + y·cos(xy). At (1, 2) that is 4 + 2cos 2 ≈ 3.1677. Likewise ∂f/∂y = x² + x·cos(xy) ≈ 0.5839, and f(1, 2) = 2 + sin 2 ≈ 2.9093.

Mixed partial fxy = ∂²f/∂y∂x of x³y² at (2, 1)

∂f/∂x = 3x²y², and differentiating that by y gives 6x²y. At (2, 1) this is 6 × 4 × 1 = 24. The first partials are 3·4·1 = 12 and 2·8·1 = 16.

Three variables: ∂f/∂z of x·e^(yz) at (2, 1, 0)

Treating x and y as constants, ∂f/∂z = x·y·e^(yz) = 2 × 1 × 1 = 2. The gradient is (e⁰, xz·e^(yz), 2) = (1, 0, 2), whose length is √5 ≈ 2.2361.

Second partial ∂²f/∂y² of ln(x² + y²) at (1, 1)

∂f/∂y = 2y/(x² + y²) and ∂²f/∂y² = 2(x² − y²)/(x² + y²)², which is 0 when x = y. Both first partials equal 2/2 = 1 at (1, 1).

Frequently asked questions

How do you calculate a partial derivative?+

Pick the variable you are differentiating with respect to and treat every other variable as a constant. Then apply the ordinary rules. For f = x²y, ∂f/∂x = 2xy (y is a constant multiplier) and ∂f/∂y = x² (x² is a constant multiplier).

What is the difference between a derivative and a partial derivative?+

An ordinary derivative applies to a function of one variable. A partial derivative applies to a function of several variables and measures change along one variable only, with the rest held fixed. The symbol ∂ (curly d) signals a partial.

What is a mixed partial derivative?+

A mixed partial differentiates with respect to two different variables in turn. fxy means differentiate by x, then by y; in Leibniz notation that is ∂²f/∂y∂x. By Clairaut’s (Schwarz’s) theorem, if the second partials are continuous the order does not matter, so fxy = fyx.

What does the gradient tell you?+

The gradient ∇f is the vector of first partial derivatives. It points in the direction in which f increases fastest, and its magnitude is that maximum rate of increase. It is perpendicular to the level curves or surfaces of f.

Where are partial derivatives used?+

They appear wherever a quantity depends on several inputs: marginal cost and marginal utility in economics, heat and wave equations in physics, sensitivity analysis in engineering, and gradient descent for training machine-learning models.

Related tools