Skip to main content

Directional Derivative Calculator

Calculate the directional derivative of f(x, y, z) at a point along a direction vector, with the symbolic and numeric gradient, the maximum rate of change, and the unit direction it's achieved along.

Input

Building a 2-variable function? Just leave z out of the expression.

The point P = (x, y, z) to evaluate at.

Direction vector v = (a, b, c) — doesn't need to be a unit vector, it's normalized automatically.

Output

Step-by-Step Derivation
Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/directional-derivative-calculator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "f": "x^2 + y^2 + z^2",
    "x": "1",
    "y": "1",
    "z": "1",
    "a": "1",
    "b": "0",
    "c": "0"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `directional-derivative-calculator` tool (Directional Derivative Calculator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/directional-derivative-calculator/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="Directional Derivative Calculator — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits
Need more credits?View pricing

Also available with

Guides

The Directional Derivative Calculator finds the rate of change of a function f(x, y, z) at a point P, along any direction vector you choose. It shows the symbolic and numeric gradient at that point, the directional derivative itself, and the maximum possible rate of change along with the exact unit direction it's achieved in — with a full step-by-step derivation.

It's built for multivariable calculus students checking a homework answer, and for anyone who needs a directional derivative without differentiating three partial derivatives and normalizing a vector by hand.

How to use it

  1. Enter your function f(x, y, z) — standard math notation works: ^ for powers, * for multiplication, plus sqrt(), sin(), cos(), log(), and the other functions supported by mathjs's expression parser. Working with a 2-variable function? Just leave z out of the expression.
  2. Enter the point (x, y, z) to evaluate at.
  3. Enter a direction vector (a, b, c) — it doesn't need to be a unit vector; the calculator normalizes it automatically.
  4. Read Directional Derivative D_u f(P) for the rate of change along that direction, Gradient ∇f(P) for the numeric gradient vector, and Maximum Rate of Change with Direction of Maximum Rate for the fastest possible increase and which way it points.

Results update automatically as you type. For example, f = x*y*z at (1, 2, 3) along direction (1, 1, 1) returns a directional derivative of 6.35085, with a maximum possible rate of change of 7 achieved along (0.857143, 0.428571, 0.285714).

What is a directional derivative?

For a scalar function f(x, y, z), the directional derivative along a unit vector u is:

D_u f(P) = ∇f(P) · u

It measures how fast f changes if you move away from P in the direction u — a generalization of an ordinary derivative (which only tells you the rate of change along one axis) to any direction in space. If your direction vector isn't already a unit vector, it's normalized first (divided by its own length) since only the direction, not the magnitude, of v should affect the answer.

Why does the maximum rate of change matter?

The dot product ∇f(P) · u is largest when u points in the same direction as the gradient itself — that's a direct consequence of the dot-product-as-cosine identity, since cos(0°) = 1 is the largest value cosine can take. So the gradient always points in the direction of steepest ascent, and its magnitude |∇f(P)| is that maximum rate. This calculator reports both: the rate of change along the direction you asked about, and the best possible rate available at that point.

What functions can I enter?

Anything mathjs's expression evaluator understands: polynomials (x^2*y - 2*z), trigonometric functions (sin(x*z), cos(y)), roots and logarithms (sqrt(x), log(y)), and combinations of these, using x, y, and z as the three variables. Angles in trig functions are in radians by default — write pi for π.

Need the curl of a vector field instead of a scalar function's gradient? See the Curl Calculator. To evaluate arbitrary math expressions directly, see the Math Evaluator.

Privacy

This calculator runs entirely in your browser. Your function, point, and direction vector are never uploaded, logged, or stored — the computation happens locally on your device.

directional derivativegradient calculatorpartial derivative calculatordel frate of changemultivariable calculusvector calculussteepest ascent

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.