Gradient Calculator

Published on: July 21, 2026
Final Answer: Free • Full Steps: Pro

This Gradient Calculator collects the partial derivatives of a function into a single vector, and shows the working line by line. Each component measures how fast the function changes along one axis while the others are held still. Together they point in the direction of steepest increase, and their length is how steep that is. Following the same pattern every time keeps each variable differentiated on its own.

Step-by-step method

  1. Set up the problem.
  2. Take the partial derivative with respect to each variable (holding the others constant).
  3. Collect the partials into the gradient vector.

Formula:

\(\nabla f = \left\langle \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z} \right\rangle\)
See Example 1 Hide Example 1

Problem

\(f = x y + x z + y z\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Take the partial derivative with respect to each variable (holding the others constant).
  3. Collect the partials into the gradient vector.

Step 1

Step 1 - Partial derivative with respect to x.

In this problem:

\(\frac{\partial f}{\partial x}\)

Step 2

Step 2 - Set up the terms in the sum.

In this problem:

\(f\left(x\right) = x y + y z + x z\)

Step 3

Step 3 - Write the sum rule formula.

In this problem:

\(\frac{d}{dx}\left(f\left(x\right) + g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) + \frac{d}{dx}g\left(x\right)\)

Step 4

Step 4 - Split the derivative across the addition signs.

In this problem:

\(\frac{d}{dx}\left(x y + y z + x z\right) = \frac{d}{dx}\left(x y\right) + \frac{d}{dx}\left(y z\right) + \frac{d}{dx}\left(x z\right)\)

Step 5

Step 5 - Differentiate the separated term \(x y\).

In this problem:

\(\frac{d}{dx}\left(x y\right) = y\)

Step 6

Step 6 - Differentiate the separated term \(y z\).

In this problem:

\(\frac{d}{dx}\left(y z\right) = 0\)

Step 7

Step 7 - Differentiate the separated term \(x z\).

In this problem:

\(\frac{d}{dx}\left(x z\right) = z\)

Step 8

Step 8 - Combine and simplify.

In this problem:

\(f'\left(x\right) = y + 0 + z = y + z\)

Step 9

Step 9 - Partial derivative with respect to y.

In this problem:

\(\frac{\partial f}{\partial y}\)

Step 10

Step 10 - Set up the terms in the sum.

In this problem:

\(f\left(y\right) = x y + y z + x z\)

Step 11

Step 11 - Write the sum rule formula.

In this problem:

\(\frac{d}{dy}\left(f\left(y\right) + g\left(y\right)\right) = \frac{d}{dy}f\left(y\right) + \frac{d}{dy}g\left(y\right)\)

Step 12

Step 12 - Split the derivative across the addition signs.

In this problem:

\(\frac{d}{dy}\left(x y + y z + x z\right) = \frac{d}{dy}\left(x y\right) + \frac{d}{dy}\left(y z\right) + \frac{d}{dy}\left(x z\right)\)

Step 13

Step 13 - Differentiate the separated term \(x y\).

In this problem:

\(\frac{d}{dy}\left(x y\right) = x\)

Step 14

Step 14 - Differentiate the separated term \(y z\).

In this problem:

\(\frac{d}{dy}\left(y z\right) = z\)

Step 15

Step 15 - Differentiate the separated term \(x z\).

In this problem:

\(\frac{d}{dy}\left(x z\right) = 0\)

Step 16

Step 16 - Combine and simplify.

In this problem:

\(f'\left(y\right) = x + z + 0 = x + z\)

Step 17

Step 17 - Partial derivative with respect to z.

In this problem:

\(\frac{\partial f}{\partial z}\)

Step 18

Step 18 - Set up the terms in the sum.

In this problem:

\(f\left(z\right) = x y + y z + x z\)

Step 19

Step 19 - Write the sum rule formula.

In this problem:

\(\frac{d}{dz}\left(f\left(z\right) + g\left(z\right)\right) = \frac{d}{dz}f\left(z\right) + \frac{d}{dz}g\left(z\right)\)

Step 20

Step 20 - Split the derivative across the addition signs.

In this problem:

\(\frac{d}{dz}\left(x y + y z + x z\right) = \frac{d}{dz}\left(x y\right) + \frac{d}{dz}\left(y z\right) + \frac{d}{dz}\left(x z\right)\)

Step 21

Step 21 - Differentiate the separated term \(x y\).

In this problem:

\(\frac{d}{dz}\left(x y\right) = 0\)

Step 22

Step 22 - Differentiate the separated term \(y z\).

In this problem:

\(\frac{d}{dz}\left(y z\right) = y\)

Step 23

Step 23 - Differentiate the separated term \(x z\).

In this problem:

\(\frac{d}{dz}\left(x z\right) = x\)

Step 24

Step 24 - Combine and simplify.

In this problem:

\(f'\left(z\right) = 0 + y + x = x + y\)

Step 25

Step 25 - Collect the partials into the gradient vector.

In this problem:

\(\nabla f = \left\langle y + z,\; x + z,\; x + y \right\rangle\)

Final Answer

\(\nabla f = \left\langle y + z,\; x + z,\; x + y \right\rangle\)
See Example 2 Hide Example 2

Problem

\(f = x^{2} y^{3}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Take the partial derivative with respect to each variable (holding the others constant).
  3. Collect the partials into the gradient vector.

Step 1

Step 1 - Partial derivative with respect to x.

In this problem:

\(\frac{\partial f}{\partial x}\)

Step 2

Step 2 - Set up the coefficient and the variable part.

In this problem:

\(x^{2} y^{3} = y^{3}\cdot \left(x^{2}\right)\)

Step 3

Step 3 - Write the constant multiple rule formula.

In this problem:

\(\frac{d}{dx}\left(c\cdot f\left(x\right)\right) = c\cdot \frac{d}{dx}f\left(x\right)\)

Step 4

Step 4 - Apply the constant multiple rule.

In this problem:

\(\frac{d}{dx}\left(x^{2} y^{3}\right) = y^{3}\cdot \frac{d}{dx}\left(x^{2}\right)\)

Step 5

Step 5 - Partial derivative with respect to y.

In this problem:

\(\frac{\partial f}{\partial y}\)

Step 6

Step 6 - Set up the coefficient and the variable part.

In this problem:

\(x^{2} y^{3} = x^{2}\cdot \left(y^{3}\right)\)

Step 7

Step 7 - Write the constant multiple rule formula.

In this problem:

\(\frac{d}{dy}\left(c\cdot f\left(y\right)\right) = c\cdot \frac{d}{dy}f\left(y\right)\)

Step 8

Step 8 - Apply the constant multiple rule.

In this problem:

\(\frac{d}{dy}\left(x^{2} y^{3}\right) = x^{2}\cdot \frac{d}{dy}\left(y^{3}\right)\)

Step 9

Step 9 - Collect the partials into the gradient vector.

In this problem:

\(\nabla f = \left\langle 2 x y^{3},\; 3 x^{2} y^{2} \right\rangle\)

Final Answer

\(\nabla f = \left\langle 2 x y^{3},\; 3 x^{2} y^{2} \right\rangle\)

Example Problems

Click one to load it into the box and solve it.