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.

Function & Point

Use ^, *, sin(), cos(), exp(), log(), sqrt(), PI

Quick Examples

Enter a function and point, then click Compute Gradient.

Summary

Enter a function f(x,y) and a point (a, b) to instantly compute the gradient vector and visualize the direction of steepest ascent.

How it works

  1. Enter your function f(x, y) using standard math notation (e.g. x^2 + y^2).
  2. Specify the point (x, y) where you want to evaluate the gradient.
  3. The calculator computes partial derivatives ∂f/∂x and ∂f/∂y symbolically via finite differences.
  4. The gradient vector ∇f(a, b) = (∂f/∂x, ∂f/∂y) is displayed at the given point.
  5. A canvas diagram shows the gradient arrow overlaid on a contour-like background.
  6. 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.

Frequently Asked Questions

Last updated: 2026-07-23 · Reviewed by Nham Vu