Search the complete library

What do you want to learn or calculate?

Quick linksAll calculatorsMath subjectsPractice questionsFormula library
← Back to calculators

Directional Derivative Calculator

Solve directional derivative problems with clear steps, notation, and a final check.

d/dx

Calculate without using AI.

Evaluate the governing formula locally in your browser. Define each known quantity once, then change values to test another case instantly.

Local result

Choose an example or enter a formula.

Show your work Step-by-step method
  1. No account, AI request, or paid token is used.

Recent calculations

No calculations yet.

Calculus

Directional Derivative Calculator explained

The short version

  • A directional derivative is the slope you feel when you walk across a surface in one chosen compass direction.
  • It is the gradient dotted with a unit vector, so the direction must be shrunk to length 1 first.
  • The steepest climb is always along the gradient, and its slope is exactly the gradient's length.

The formula this page uses

D_u f = ∇f · u, where ∇f = (∂f/∂x, ∂f/∂y) and u = v / |v|

What each part means

SymbolWhat it means
∇f — GradientThe vector of partial derivatives. It points uphill, steepest first.
v — Direction vectorThe way you want to walk. Its length does not matter; only its direction does.
u — Unit directionv divided by its own length, so |u| = 1. Skipping this step scales the answer wrongly.
D_u f — Directional derivativeRise per unit of horizontal travel in direction u. Same units as ∂f/∂x.

Show your work: a full example

  1. The function and pointf(x, y) = x²y + 3y at the point (2, 1), in the direction v = (3, 4)
  2. Partial derivatives∂f/∂x = 2xy and ∂f/∂y = x² + 3
  3. Evaluate the gradient at (2, 1)∇f = (2·2·1, 2² + 3) = (4, 7)
  4. Length of the direction vector|v| = √(3² + 4²) = √25 = 5
  5. Shrink it to a unit vectoru = (3/5, 4/5) = (0.6, 0.8)
  6. Dot the gradient with u4(0.6) + 7(0.8) = 2.4 + 5.6
  7. The slope in that direction8.0

A second, different case

  1. A different case: walk sideways instead of uphillsame point (2, 1), same gradient (4, 7), direction v = (7, −4)
  2. Note that v is perpendicular to the gradient(4)(7) + (7)(−4) = 28 − 28 = 0
  3. Length of v√(7² + (−4)²) = √65 ≈ 8.062
  4. Unit vectoru ≈ (0.868, −0.496)
  5. Dot with the gradient4(0.868) + 7(−0.496) = 3.472 − 3.472 = 0
  6. Read itzero slope means you are walking along a level curve, staying at the same height
  7. Reverse the gradient insteadv = (−4, −7) gives D_u f = −65/√65 = −√65 ≈ −8.062, the steepest possible descent
Copy-ready example

f(x, y) = x²y + 3y at the point (2, 1), in the direction v = (3, 4)

The function and point

Every direction at the point (2, 1), where ∇f = (4, 7) and |∇f| = √65 ≈ 8.062

Direction vUnit vector uD_u fWhat it means
(4, 7)(0.496, 0.868)8.062steepest climb, equal to |∇f|
(3, 4)(0.6, 0.8)8.000very close to the steepest direction
(1, 0)(1, 0)4this is just ∂f/∂x
(0, 1)(0, 1)7this is just ∂f/∂y
(7, −4)(0.868, −0.496)0along the level curve, no change in height
(−4, −7)(−0.496, −0.868)−8.062steepest descent

Three mistakes to check for

What students writeWhy it's wrongDo this instead
D_u f = (4, 7) · (3, 4) = 12 + 28 = 40The direction vector was never shrunk to length 1, so the answer is 5 times too big.Divide by |v| = 5 first: (4, 7) · (0.6, 0.8) = 8.
Leaving the answer as a vectorThe dot product of two vectors is a single number, and a slope has to be a number.D_u f = 8, not (2.4, 5.6).
Assuming the maximum directional derivative equals the largest partial derivativeThe largest partial here is 7, but walking diagonally beats both axes.The maximum is |∇f| = √65 ≈ 8.06, in the direction of ∇f itself.

Questions about the Directional Derivative Calculator

Why must the direction vector have length 1?

Because D_u f is a rate per unit of distance travelled. If u were twice as long you would be measuring rise over two steps and calling it one, which is why (3, 4) unnormalised gives 40 instead of 8.

What does a directional derivative of zero mean?

You are moving along a level curve, so the height is momentarily unchanged. That happens exactly when the direction is perpendicular to the gradient, which is the second worked example above.

How is this different from a partial derivative?

A partial derivative is a directional derivative in one of the two axis directions. The table shows it directly: u = (1, 0) returns 4, which is ∂f/∂x, and u = (0, 1) returns 7, which is ∂f/∂y.

Can the answer be negative?

Yes, and it simply means the surface drops off in that direction. The most negative value possible is −|∇f|, reached by walking exactly opposite the gradient, which here gives −8.062.

Where to go next

Continue from this result

Turn one calculation into understanding.

Compare another tool, review the underlying idea, then solve a fresh problem without copying the example.