Gradient Vector Calculator
Enter a function f(x,y) and a point (a, b) to instantly compute the gradient vector and visualize the direction of steepest ascent.
Use the Gradient Vector Calculator
Function & Point
Use ^, *, sin(), cos(), exp(), log(), sqrt(), PI
Quick Examples
Gradient Vector ∇f(a, b)
∂f/∂x
—
∂f/∂y
—
Magnitude & Unit Vector
‖∇f‖
—
Unit direction
—
Steepest Ascent Angle
—
Angle of ∇f measured from the positive x-axis
Enter a function and point, then click Compute Gradient.
Gradient Direction (at point)
Arrow = gradient direction | Length proportional to magnitude
Summary
The Gradient Vector Calculator computes the gradient ∇f(a, b) of any two-variable function at a specified point using high-precision numeric differentiation. It shows both partial derivatives, the gradient magnitude, and the unit direction vector — making it useful for calculus coursework, optimization analysis, and building intuition around machine learning algorithms like gradient descent.
How it works
- Enter your function f(x, y) using standard math notation (e.g. x^2 + y^2).
- Specify the point (x, y) where you want to evaluate the gradient.
- The calculator computes partial derivatives ∂f/∂x and ∂f/∂y numerically via central finite differences.
- The gradient vector ∇f(a, b) = (∂f/∂x, ∂f/∂y) is displayed at the given point.
- A canvas diagram shows the gradient arrow overlaid on a contour-like background.
- The magnitude ‖∇f‖ and the unit direction vector are also shown.
Use cases
- Check partial derivative calculations for multivariable calculus homework.
- Find the steepest ascent direction for optimization problems.
- Visualize gradient fields for machine learning intuition (gradient descent).
- Verify analytical gradients against numeric approximations.
- Understand saddle points and local extrema in two-variable functions.
- Explore how changing x or y affects the gradient direction.