Skip to content
D DocNectar

Free Gradient Calculator

Compute the gradient vector of a simple polynomial function at a given point.

100% Free No Signup Works on all devices

Built and fact-checked by the DocNectar team — see our editorial standards

Thanks for rating!

Key Features

Instant Calculation

Get accurate results in real time with our optimized algorithm.

Mobile Friendly

Fully responsive design. Works on all devices & screen sizes.

Privacy Focused

Your data stays on your device. We don't store any inputs.

100% Free

No hidden costs. This tool is completely free forever.

The gradient of a multivariable function is the vector formed by all of its partial derivatives — one per input variable — and it points in exactly the direction where the function increases most steeply from a given point, with its magnitude telling you how steep that steepest ascent actually is. This tool handles functions of the form f = ax²+by²(+cz²)+dx+ey(+fz), evaluating the gradient at a point you choose. Gradients are central to machine learning (gradient descent, the core optimization technique behind training neural networks, literally walks downhill along the negative gradient), physics (the gradient of a potential field gives the direction of the resulting force), and geography/GIS (the gradient of an elevation surface points in the direction of steepest uphill climb at any location).

How it works

Enter the function's coefficients and the point to evaluate at. The calculator applies the power rule to each variable independently and combines the results into a vector: for a term ax², the partial derivative with respect to x is 2ax (the exponent 2 comes down as a multiplying factor, and the power drops by one, leaving x¹); for a linear term dx, the partial derivative is simply the constant d. Because each variable's squared and linear terms are independent in this function shape (with no mixed terms like xy), each partial derivative only involves that one variable, evaluated at your chosen point's corresponding coordinate.

  1. Enter dimension.
  2. Enter a (coefficient of x²).
  3. Enter b (coefficient of y²).
  4. Enter c (coefficient of z², 3D only).
  5. Enter d (coefficient of x).
  6. Enter e (coefficient of y).
  7. Enter f (coefficient of z, 3D only).
  8. Enter point — x0.
  9. Enter point — y0.
  10. Enter point — z0 (3D only).
  11. Click Calculate to see your results.

Examples

f(x,y) = x² + y² at (2, 3)

∂f/∂x = 2x = 2(2) = 4. ∂f/∂y = 2y = 2(3) = 6. So ∇f = (4, 6), with magnitude √(4²+6²) = √52 ≈ 7.21.

f(x,y) = 3x² + 2y² + 5x − 4y at (1, −2)

∂f/∂x = 6x + 5 = 6(1) + 5 = 11. ∂f/∂y = 4y − 4 = 4(−2) − 4 = −12. So ∇f = (11, −12), with magnitude √(11²+12²) = √265 ≈ 16.28.

f(x,y,z) = x² + 2y² + 3z² + x − y + z at (1, 1, 1)

∂f/∂x = 2x + 1 = 3. ∂f/∂y = 4y − 1 = 3. ∂f/∂z = 6z + 1 = 7. So ∇f = (3, 3, 7), with magnitude √(9+9+49) = √67 ≈ 8.19.

Who should use it

  • Multivariable calculus coursework on partial derivatives and gradients.
  • Understanding the direction of steepest ascent for a simple surface.
  • Conceptual grounding before studying gradient descent in machine learning.

Industry applications

  • Machine learning and optimization
  • Physics (potential fields and forces)
  • GIS and terrain analysis

Advantages

  • Handles 2D and 3D polynomial functions of this independent-term shape.
  • Reports both the gradient vector and its magnitude.

Limitations

  • Doesn't support mixed terms like xy or transcendental functions like sin(x) or eˣ.

Common mistakes to avoid

  • Forgetting that the coefficient of the squared term doubles under differentiation (d/dx of ax² is 2ax, not ax).
  • Applying a partial derivative with respect to x while accidentally treating the y-terms as if they also depended on x (they don't, in this independent-term function shape).
  • Reporting only the partial derivatives without combining them into the full gradient vector, or forgetting to compute its magnitude when asked for the rate of steepest increase.

Best practices

  • Differentiate one variable at a time, treating all others as constants, then assemble the results into the gradient vector.
  • Double-check the power rule application on each squared term — the exponent becomes a coefficient and the power drops by one.
  • Remember the gradient's magnitude (not just its direction) answers "how steep," while its direction answers "which way."

Tips

  • Need the equation of a tangent plane at a point on a related surface? Use the Equation of a Plane Calculator with a point and this gradient as the normal vector.

Frequently asked questions

It handles this specific basic polynomial shape only (independent squared and linear terms per variable, no cross terms like xy) — full symbolic differentiation of arbitrary functions (including products of variables, trig functions, or exponentials) is out of scope.
It points toward the direction, among all possible directions from that point, in which the function's value increases fastest — moving in the exact opposite direction gives the steepest decrease.
How steep that fastest increase actually is — a larger magnitude means the function is changing more rapidly near that point, while a magnitude of zero means the point is a local flat spot (a candidate for a maximum, minimum, or saddle point).
The gradient is simply the vector that collects all of a function's partial derivatives (one per variable) together into a single object — for a 2-variable function, that's (∂f/∂x, ∂f/∂y); for 3 variables, (∂f/∂x, ∂f/∂y, ∂f/∂z).
This is the power rule from calculus: the derivative of xⁿ is n·xⁿ⁻¹, so for x² (n=2), the derivative is 2x¹ = 2x — the same rule applies to each variable independently when taking partial derivatives.
It's the multivariable generalization of that idea — instead of one number describing a single 2D slope, the gradient is a full vector describing the steepest direction and rate of change across multiple dimensions simultaneously.

Get new calculators and guides in your inbox

No spam — just new tools like Gradient Calculator and practical guides.

Favorites