Partial Derivative Calculator

Differentiate multivariable functions with respect to x or y while holding the other variable constant.

Partial Derivative Calculator

What Is a Partial Derivative?

A partial derivative measures how a multivariable function changes with respect to one variable while every other variable is held fixed. For a function f(x, y), the partial derivative with respect to x — written ∂f/∂x — treats y as if it were a constant number and differentiates normally using all the usual rules (power rule, product rule, chain rule). The partial derivative with respect to y, ∂f/∂y, does the reverse: it treats x as constant.

Geometrically, if f(x, y) describes a surface in three dimensions, ∂f/∂x at a point gives the slope of the surface in the x-direction at that point, and ∂f/∂y gives the slope in the y-direction. Together, these two partials are the building blocks for gradients, tangent planes, directional derivatives, and optimization of multivariable functions.

How to Use This Calculator

Enter a function of x and y using standard notation (both variables can appear anywhere in the expression). Choose whether to differentiate with respect to x or y — the calculator holds the other variable constant automatically. If you provide numeric values for both x and y, it evaluates the resulting partial derivative at that point. The graph shows a cross-section: with the non-differentiated variable fixed at your chosen value (or 1 by default), it plots f and the partial derivative as ordinary single-variable functions along the differentiated axis.

Worked Example

Let f(x, y) = x²y + sin(xy). To find ∂f/∂x, treat y as a constant coefficient:

  • ∂/∂x[x²y] = 2xy (power rule on x², with y along for the ride as a constant multiplier)
  • ∂/∂x[sin(xy)] = cos(xy)·y (chain rule: derivative of sin is cos, times the derivative of the inner term xy with respect to x, which is y)

So ∂f/∂x = 2xy + y·cos(xy). Similarly, ∂f/∂y = x² + x·cos(xy), since now x is held constant. Try entering the function above and switching between "with respect to x" and "with respect to y" to see both.

Common Mistakes to Avoid

  • Differentiating the "constant" variable by accident. When finding ∂f/∂x, any standalone y term (not multiplied by x) has a partial derivative of zero — it's easy to instinctively differentiate it anyway.
  • Forgetting the other variable in the chain rule. For sin(xy), the inner derivative with respect to x is y (not 1), since y is being treated as a constant multiplier of x, not ignored entirely.
  • Mixing up ∂f/∂x and ∂f/∂y. These are usually different functions — always double check which variable you're differentiating with respect to before evaluating at a point.

Real-World Applications of Partial Derivatives

Most real quantities depend on more than one variable at once, which is exactly why partial derivatives matter so much in applied work. In economics, a utility or production function often depends on several inputs — labor and capital, or the quantities of several goods consumed — and the partial derivative with respect to one input, holding the others fixed, gives its marginal contribution: marginal productivity of labor, or marginal utility of a specific good. In thermodynamics, quantities like pressure, volume, and temperature are linked by equations of state, and partial derivatives describe how one changes while the others are deliberately held constant, which is central to defining properties like heat capacity.

In machine learning, partial derivatives are the backbone of training neural networks: the loss function depends on potentially millions of parameters (weights), and the partial derivative of the loss with respect to each individual weight tells the training algorithm which direction to nudge that weight to reduce error — collected together, those partial derivatives form the gradient used by gradient descent. In engineering and physics, partial derivatives describe fields that vary in space and time simultaneously — temperature distribution across a metal plate, fluid velocity in a pipe, or electric potential around a charge — where ∂T/∂x describes how temperature changes across space at a fixed moment, and ∂T/∂t describes how it changes over time at a fixed location.

Frequently Asked Questions

How is a partial derivative different from a regular derivative?

A regular derivative applies to a function of one variable. A partial derivative applies to a function of two or more variables, and measures the rate of change with respect to just one of them while the rest are frozen at fixed values. For single-variable derivatives, use the Derivative Calculator.

What is the gradient, and how does it relate to partial derivatives?

The gradient of f(x, y) is the vector (∂f/∂x, ∂f/∂y) — it combines both partial derivatives into a single vector that points in the direction of steepest increase of the function. This calculator computes each partial derivative individually; a dedicated gradient tool is on our roadmap.

Can I take a partial derivative of a function with three or more variables?

This calculator currently supports functions of x and y. The same idea extends directly to more variables — you just hold all variables except the one you're differentiating with respect to constant.

What does it mean if ∂f/∂x = 0 at a point?

It means the surface is momentarily flat in the x-direction at that point — a necessary (but not sufficient) condition for that point to be a local extremum of the multivariable function, similar to how f'(x) = 0 signals a critical point for single-variable functions.

Why does the graph only show a 2D cross-section instead of a 3D surface?

A true 3D surface plot would require additional rendering complexity, so this tool instead fixes one variable and plots the resulting single-variable cross-section — which is exactly the geometric idea a partial derivative captures: the slope along one direction while the other variable stays fixed.

Do I always need both ∂f/∂x and ∂f/∂y for a problem?

It depends on the question. If you only need the rate of change in one specific direction, one partial derivative is enough. But many standard multivariable calculus tasks — finding the gradient, locating critical points of a multivariable function, or building a tangent plane — require both partials together, since each captures only half of the surface's local behavior on its own.