My Calculator

Gradient Calculator

Compute the gradient vector ∇f = ⟨∂f/∂x, ∂f/∂y⟩ for a multivariable function with step-by-step partial derivative work.

Enter a function of x and y
Math Keyboard

Try an example

Functionf(x,y) = x² · y + 3 · x · y²
Gradient∇f = ⟨2 · x · y + 3 · y², x² + 3 · x · 2 · y⟩
∂f/∂x2 · x · y + 3 · y²
∂f/∂yx² + 3 · x · 2 · y
At point(1, 2)
Magnitude20.61553

Gradient solution steps

The calculator computes the two partial derivatives and then forms the gradient vector.

Given: Find ∇f at (1, 2) for f(x,y) = x²*y + 3*x*y²

  1. Step 1: Power rule for ∂/∂x

    Apply the power rule. If the base itself depends on x, multiply by its derivative too.

    ∂/∂x[x²] = 2·x¹
  2. Step 2: Constant multiple rule for ∂/∂x

    y is independent of x, so it remains constant while differentiating the first factor.

    ∂/∂x[x² · y] = (2 · x) · y
  3. Step 3: Constant multiple rule for ∂/∂x

    3 is independent of x, so it remains constant while differentiating the other factor.

    ∂/∂x[3 · x] = 3 · (1)
  4. Step 4: Constant multiple rule for ∂/∂y

    x^2 is independent of y, so it remains constant while differentiating the other factor.

    ∂/∂y[x² · y] = x² · (1)
  5. Step 5: Power rule for ∂/∂y

    Apply the power rule. If the base itself depends on y, multiply by its derivative too.

    ∂/∂y[y²] = 2·y¹
  6. Step 6: Constant multiple rule for ∂/∂y

    3 · x is independent of y, so it remains constant while differentiating the other factor.

    ∂/∂y[3 · x · y²] = 3 · x · (2 · y)

Gradient vector

⟨2 · x · y + 3 · y², x² + 3 · x · 2 · y⟩

Gradient Calculator with full step-by-step reasoning

A gradient is the vector of all first partial derivatives of a multivariable function. For a function f(x, y), the gradient is written as ∇f = ⟨∂f/∂x, ∂f/∂y⟩.

This calculator builds the gradient by computing ∂f/∂x and ∂f/∂y separately, then combining them into a single vector that shows the direction of greatest increase.

The result is useful in optimization, machine learning, and physics because it tells you which way a function rises most steeply at a point.

How to read the gradient

The first component of the gradient is the rate of change in the x-direction. The second component is the rate of change in the y-direction.

When both values are known, the gradient points toward the steepest increase of the function and its magnitude measures how steep that increase is.

  • gradient calculator
  • gradient formula
  • calculate gradient vector
  • partial derivatives and gradient
  • multivariable gradient solver