Built and fact-checked by the DocNectar team — see our editorial standards
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.
- Enter dimension.
- Enter a (coefficient of x²).
- Enter b (coefficient of y²).
- Enter c (coefficient of z², 3D only).
- Enter d (coefficient of x).
- Enter e (coefficient of y).
- Enter f (coefficient of z, 3D only).
- Enter point — x0.
- Enter point — y0.
- Enter point — z0 (3D only).
- 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.