Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Directional derivative calculator

Enter a function of two or three variables, a point and a direction. You get the partial derivatives, the gradient, the unit vector and the rate of change of f in that direction.

Point

Direction vector u (it will be normalized)

Use x, y and z with + − * / ^ and functions like sin, e^x, ln and sqrt. For a direction given as an angle θ, use u = (cos θ, sin θ).

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Integrating over a region instead? Use the double integral calculator. One variable? The derivative calculator shows every step.

What a directional derivative is

For a function of several variables, the rate of change depends on which way you move. The directional derivative Duf is the rate of change of f at a point when you move in the direction of a unit vector u. The partial derivatives ∂f/∂x and ∂f/∂y are the special cases of moving along the x- and y-axes.

How it's calculated

∇f = ⟨∂f/∂x, ∂f/∂y⟩ (add ∂f/∂z in 3D)
û = u / |u|
Duf = ∇f · û
  1. Differentiate f with respect to each variable, holding the others constant.
  2. Evaluate those partial derivatives at the point to get the gradient vector.
  3. Divide the direction vector by its length so it's a unit vector. Forgetting this step is the most common mistake.
  4. Take the dot product.

Worked example

f(x, y) = x²y at the point (1, 2), in the direction u = ⟨3, 4⟩.

  1. ∂f/∂x = 2xy and ∂f/∂y = x². At (1, 2), ∇f = ⟨4, 1⟩.
  2. |u| = √(3² + 4²) = 5, so û = ⟨0.6, 0.8⟩.
  3. Duf = 4(0.6) + 1(0.8) = 16/5 = 3.2.

The gradient's key facts

  • f increases fastest in the direction of ∇f, at a rate of |∇f|. Here |∇f| = √17 ≈ 4.1231.
  • f decreases fastest in the opposite direction, at a rate of −|∇f|.
  • Moving at right angles to ∇f, along a level curve, the rate of change is 0.

Limitations

  • f must be differentiable at the point. If a partial derivative is undefined there, the calculator says so.
  • The direction can't be the zero vector, since it has no direction to normalize.
  • Up to three variables: x, y and z.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • x²y at (1, 2) toward ⟨3, 4⟩: 16/5 ✓
  • xyz at (1, 2, 3) toward ⟨1, 1, 1⟩: 11/√3 ✓
  • The zero vector has no direction ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

How do you find a directional derivative?

Compute the gradient ∇f at the point, turn the direction into a unit vector by dividing by its length, and take the dot product ∇f · û.

Why does the direction have to be a unit vector?

So the answer measures change per unit of distance moved. With a longer vector, the dot product would be scaled up by the vector's length.

What is the maximum directional derivative?

|∇f|, the length of the gradient, reached when you move in the same direction as the gradient.

How do I use an angle instead of a vector?

A direction at angle θ from the positive x-axis is u = ⟨cos θ, sin θ⟩, which is already a unit vector. Type cos(θ) and sin(θ) as the components, for example cos(pi/6) and sin(pi/6).

Related calculators