Skip to content
ENExplore Calculators

Gradient Of A Function Calculator

Work out gradient of a function instantly with clear inputs, formula shown and shareable results.

About Gradient Of A Function Calculator

The gradient collects the partial derivatives into a vector that points in the direction of steepest increase. Its magnitude is the maximum rate of change, and it is always perpendicular to the level surfaces.

Formula

Gradient

∇f = (∂f/∂x, ∂f/∂y, ∂f/∂z), |∇f| is the maximum rate of change

Worked example

With the default values below, Gradient Of A Function Calculator returns Magnitude of the gradient of 13.00000000. Change any input above and every figure here is recalculated in your browser.

Inputs used

∂f/∂x
3
∂f/∂y
4
∂f/∂z
12

Results

Magnitude of the gradient
13.00000000
Gradient vector
(3, 4, 12)
Unit direction of steepest ascent
(0.230769, 0.307692, 0.923077)
Unit direction of steepest descent
(-0.230769, -0.307692, -0.923077)

Step by step

  1. 1Values used
  2. 2Gradient
  3. 3Magnitude of the gradient= 13.00000000
  4. 4Gradient vector= (3, 4, 12)
  5. 5Unit direction of steepest ascent= (0.230769, 0.307692, 0.923077)
  6. 6Unit direction of steepest descent= (-0.230769, -0.307692, -0.923077)

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 8 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

For partials 3, 4 and 12?

The magnitude is 13, and the unit direction is (3/13, 4/13, 12/13).

Why does gradient descent use the negative?

Because minimising means moving against the direction of steepest increase, which is the fastest way downhill.

Gradient Of A Function Calculator | Calcrivo