Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

Partial Derivative Calculator

Enter a function of several variables and the variable or sequence of variables to differentiate with respect to, and get the partial derivative with every rule shown, plus its value at a point if you want one.

One letter per differentiation: x, y, xy (∂²f/∂y∂x), xx …

Optional. Give every variable a value, e.g. x = 1, y = 2.

Examples

About the Partial Derivative Calculator

Most quantities in science and economics depend on more than one input. The volume of a cylinder depends on its radius and its height, a company's profit depends on price and advertising spend, and the temperature in a room depends on all three coordinates. A partial derivative answers a focused question about such a function: how fast does the output change when one input moves and every other input stays fixed?

This calculator computes those rates exactly. Type a function such as x2y+sin⁡(xy)x^2 y + \sin(xy), choose the variable, and it differentiates term by term using the sum, constant multiple, power, product and chain rules, treating every other letter as a constant. Each rule appears as its own step, so you can see why yy survives in front of cos⁡(xy)\cos(xy) and why a term like 4y4y disappears when you differentiate with respect to xx.

Higher-order derivatives work the same way. Enter xx for the second partial in xx, or xy for the mixed partial that differentiates first in xx and then in yy. Add a point such as x = 1, y = 2 to evaluate the result there. Every answer is cross-checked against a numerical finite-difference estimate before it is shown.

What is a partial derivative?

For a function f(x,y)f(x, y), the partial derivative with respect to xx, written ∂f∂x\frac{\partial f}{\partial x} or fxf_x, is the ordinary derivative you get by treating yy as a fixed number. Formally, fx(x,y)=lim⁡h→0f(x+h,y)−f(x,y)hf_x(x, y) = \lim_{h\to 0} \frac{f(x+h, y) - f(x, y)}{h}. The curly symbol ∂\partial signals that other variables are present and being held constant.

Geometrically, the graph of f(x,y)f(x, y) is a surface. Slicing that surface with the plane y=y = constant gives a curve, and fxf_x is the slope of that curve. Likewise, fyf_y is the slope of the slice in the yy-direction. Together the first-order partials form the gradient vector ∇f=⟨fx,fy⟩\nabla f = \langle f_x, f_y \rangle, which points in the direction of steepest increase.

Partial derivatives appear in optimisation (critical points are where all first partials vanish), in physics (the heat, wave and Laplace equations are written with them), in economics (marginal cost and marginal utility) and in machine learning, where gradients drive the training of every neural network.

How to use the Partial Derivative Calculator

  1. Type the function using any letters as variables, for example x^2 y + sin(x y) or x^3 y^2 + 4y. A space or * between letters means multiplication.
  2. In the second box enter the variable to differentiate with respect to, such as x or y.
  3. For higher orders, list one letter per differentiation in order: xx for f_xx, xy for f_xy (first x, then y), yyx and so on.
  4. Optionally give every variable a value, such as x = 1, y = 2, to evaluate the derivative at that point.
  5. Press Differentiate and follow the steps, each labelled with the rule it uses.

Formulas

Definition

fx(x,y)=lim⁡h→0f(x+h, y)−f(x, y)hf_x(x,y) = \lim_{h\to 0}\frac{f(x+h,\,y) - f(x,\,y)}{h}

Mixed partial notation

fxy=∂∂y(∂f∂x)=∂2f∂y ∂xf_{xy} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right) = \frac{\partial^2 f}{\partial y\,\partial x}

Clairaut's theorem

fxy=fyxwhen both are continuousf_{xy} = f_{yx}\quad\text{when both are continuous}

Gradient

∇f=⟨∂f∂x, ∂f∂y⟩\nabla f = \left\langle \frac{\partial f}{\partial x},\ \frac{\partial f}{\partial y} \right\rangle

Chain rule inside a partial

∂∂xsin⁡(xy)=cos⁡(xy)⋅y\frac{\partial}{\partial x}\sin(xy) = \cos(xy)\cdot y

Worked example: ∂/∂x of x²y + sin(xy)

The worked example below is computed live for f(x,y)=x2y+sin⁡(xy)f(x, y) = x^2 y + \sin(xy), differentiated with respect to xx. With yy held constant, the first term is a constant times x2x^2, so it becomes 2xy2xy. The second term needs the chain rule: the derivative of sin⁡u\sin u is cos⁡u\cos u times ∂u∂x\frac{\partial u}{\partial x}, and for u=xyu = xy that inner derivative is yy.

Adding the pieces gives 2xy+ycos⁡(xy)2xy + y\cos(xy), which the calculator factors as fx=y(2x+cos⁡(xy))f_x = y(2x + \cos(xy)). Notice that yy never gets differentiated; it behaves exactly as the number 5 would if it stood in the same place.

The solution below is generated by the same engine that powers the calculator above.

Final answer

∂f∂x=y(2x+cos⁡(xy))\frac{\partial f}{\partial x} = y \left(2x+\cos\left( x y\right)\right)

How we read your problem

Find the first partial derivative f_x of f(x, y).

∂f∂x[x2y+sin⁡(xy)]\frac{\partial f}{\partial x}\left[{x}^{2} y+\sin\left( x y\right)\right]

Step-by-step solution

  1. Identify the function and the order of differentiation

    Differentiate with respect to x; every other variable (y) is held constant.

    f=x2y+sin⁡(xy)f = {x}^{2} y+\sin\left( x y\right)
  2. Sum rule: differentiate each term separately

    ∂∂x[x2y+sin⁡(xy)]=y(2x+cos⁡(xy))\frac{\partial}{\partial x}\left[{x}^{2} y+\sin\left( x y\right)\right] = y \left(2x+\cos\left( x y\right)\right)
  3. Chain rule — d/dx[sin u] = cos u · u′

    ∂∂x[sin⁡(xy)]=cos⁡(xy)y\frac{\partial}{\partial x}\left[\sin\left( x y\right)\right] = \cos\left( x y\right) y
  4. Constant multiple rule

    ∂∂x[xy]=y\frac{\partial}{\partial x}\left[ x y\right] = y
  5. Constant multiple rule

    ∂∂x[x2y]=2yx\frac{\partial}{\partial x}\left[{x}^{2} y\right] = 2y x
  6. Power rule: d/dx[xⁿ] = n·xⁿ⁻¹

    ∂∂x[x2]=2x\frac{\partial}{\partial x}\left[{x}^{2}\right] = 2x
  7. Simplify: f_x

    fx=y(2x+cos⁡(xy))f_{x} = y \left(2x+\cos\left( x y\right)\right)

Formulas used

  • Definition

    fx(x,y)=lim⁡h→0f(x+h,y)−f(x,y)hf_x(x,y) = \lim_{h\to 0}\frac{f(x+h,y) - f(x,y)}{h}
  • Mixed partials (Clairaut)

    fxy=fyx when both are continuousf_{xy} = f_{yx}\ \text{when both are continuous}

A partial derivative measures how f changes when only one variable moves: the other variables are treated exactly like numbers, so the usual derivative rules apply.

Verification

  • Cross-checked against an independent symbolic differentiator at several sample points ✓

Detailed explanation

Holding the other variables constant

The single idea behind every partial derivative is that the variables you are not differentiating with respect to are frozen. If you find this hard to see, substitute an actual number for them first. Differentiating x3y2+4yx^3 y^2 + 4y with respect to yy is like differentiating 8y2+4y8y^2 + 4y when x=2x = 2: the answer has the shape 2⋅8y+42 \cdot 8y + 4, and putting x3x^3 back in place of 8 gives fy=2x3y+4f_y = 2x^3 y + 4.

This also explains which terms vanish. A term that contains only frozen variables is a constant, so its partial derivative is zero. In f=x2+3xyf = x^2 + 3xy, the partial with respect to yy ignores x2x^2 entirely and gives fy=3xf_y = 3x.

The familiar rules still apply

Partial differentiation uses exactly the same rules as single-variable calculus: power, sum, constant multiple, product, quotient and chain. The only change is bookkeeping. A product of two factors that both contain xx needs the product rule when differentiating in xx, but if one factor contains only yy it is just a constant multiplier.

The chain rule is where most errors happen. When a function is applied to an expression containing several variables, such as exye^{xy} or ln⁡(x2+y2)\ln(x^2 + y^2), the inner derivative is a partial derivative too. So ∂∂xexy=yexy\frac{\partial}{\partial x} e^{xy} = y e^{xy}, and ∂∂yln⁡(x2+y2)=2yx2+y2\frac{\partial}{\partial y} \ln(x^2 + y^2) = \frac{2y}{x^2 + y^2}.

Second-order and mixed partial derivatives

Differentiating a partial derivative again gives a second-order partial. A function of two variables has four of them: fxxf_{xx}, fyyf_{yy} and the mixed partials fxyf_{xy} and fyxf_{yx}. The subscript notation is read left to right, so fxyf_{xy} means differentiate in xx first, then in yy. The fraction notation ∂2f∂y ∂x\frac{\partial^2 f}{\partial y\,\partial x} is read right to left and describes the same thing.

For f=x2y3f = x^2 y^3, differentiating in xx gives 2xy32xy^3, and then differentiating in yy gives fxy=6xy2f_{xy} = 6xy^2, which equals 24 at the point (1,2)(1, 2). Differentiating in the other order gives 3x2y23x^2y^2 and then 6xy26xy^2 again. That agreement is Clairaut's theorem: for functions whose second partials are continuous, the order of mixed differentiation does not matter. The calculator notes this as a check whenever it computes a mixed partial.

Second partials have concrete uses. In the second derivative test for a critical point of f(x,y)f(x, y), the quantity D=fxxfyy−fxy2D = f_{xx} f_{yy} - f_{xy}^2 decides whether the point is a local maximum, a local minimum or a saddle point.

Evaluating at a point and interpreting the number

A partial derivative is itself a function of all the variables, so its value depends on where you are. For f=x2+3xyf = x^2 + 3xy, the derivative fx=2x+3yf_x = 2x + 3y equals 8 at (1,2)(1, 2). That means that near this point, increasing xx by a small amount Δx\Delta x while keeping y=2y = 2 increases ff by about 8 Δx8\,\Delta x.

Units make the interpretation concrete. If V(r,h)=πr2hV(r, h) = \pi r^2 h is the volume of a cylinder in cubic centimetres, then Vr=2πrhV_r = 2\pi r h is measured in cubic centimetres per centimetre of radius and tells you how sensitive the volume is to a change in radius when the height is fixed.

Common mistakes

  • Differentiating the held-constant variable as well, for example writing ∂∂x(x2y)=2xy+x2\frac{\partial}{\partial x}(x^2 y) = 2xy + x^2.
  • Treating a term like 4y4y as surviving when differentiating with respect to xx; it is a constant and gives 0.
  • Forgetting the inner partial derivative in the chain rule, such as writing cos⁡(xy)\cos(xy) for ∂∂xsin⁡(xy)\frac{\partial}{\partial x}\sin(xy).
  • Reading fxyf_{xy} in the wrong order; the subscript order is the order of differentiation.
  • Mixing up ∂f∂x\frac{\partial f}{\partial x} with the total derivative dfdx\frac{df}{dx} when yy itself depends on xx.

Tips

  • Replace the frozen variables with numbers mentally if you lose track of what is constant.
  • Factor constants out before differentiating; x2y3x^2 y^3 is y3y^3 times x2x^2 when differentiating in xx.
  • Use Clairaut's theorem as a free check: compute fxyf_{xy} and fyxf_{yx} and compare.
  • Write ∇f\nabla f as soon as you have both first partials; most applications need the whole gradient.
  • Simplify the first derivative before taking a second one to keep expressions manageable.
  • Check the sign of a partial at a point to see whether the function rises or falls in that direction.

Frequently asked questions

How do I type a function of two variables?

Use letters for the variables and a space or * for multiplication, for example x^2 y + sin(x y) or x^2*y + sin(x*y). Any letter that is not a function name such as sin or log is treated as a variable.

How do I get a second partial derivative like f_xx?

Type the variable once per differentiation in the 'with respect to' box: xx for f_xx, yy for f_yy. The calculator differentiates repeatedly and shows each stage separately.

Is f_xy the same as f_yx?

For almost every function met in a course, yes. Clairaut's theorem guarantees it whenever the mixed partials are continuous. The calculator reports the comparison so you can see the agreement.

What does the symbol ∂ mean?

It is a rounded d used for partial derivatives. It signals that the function has several variables and that all except the one in the denominator are being held constant during differentiation.

Can it evaluate the partial derivative at a point?

Yes. Enter values for every variable, such as x = 1, y = 2, in the optional box. The calculator substitutes them into the final derivative and gives the number, for example f_x = 2x + 3y becomes 8 at (1, 2).

Does it work with three variables?

Yes. A function such as x y z or x^2 + y z can be differentiated with respect to any of its letters. For x y z, the partial with respect to z is xy.

How is a partial derivative different from an ordinary derivative?

The rules are identical, but an ordinary derivative involves one variable while a partial derivative picks one of several variables and treats the rest as constants. The result is still a function of all the variables.

What is the gradient and how do partial derivatives form it?

The gradient is the vector of all first-order partials, such as ⟨f_x, f_y⟩. It points in the direction in which the function increases fastest, and its length is that fastest rate of increase.

Why does my partial derivative look different from the textbook answer?

Equivalent expressions can be arranged in many ways. The calculator may factor a common term, as in y(2x + cos(xy)) instead of 2xy + y cos(xy), or order factors differently. Expand both forms, or evaluate them at the same point, to confirm they match.

Differentiate your multivariable function

Enter a function and the variables to differentiate with respect to above to get first, second or mixed partial derivatives with every rule shown.

More math calculators