Candid Tools

Gradient Descent Playground

Gradient Descent Playground animates discrete steps on three cost curves and illustrates learning rates and stationary points in your browser.

J(x) = x²
xₖ₊₁ = xₖ − ηJ′(xₖ)
3
0.2

Position · iteration 0

3

Cost J(x)

9

Gradient J′(x)

6
A ball follows the negative gradientCost landscapeSteps taken
-4-2-23.509214.5420Position xCost J(x)

Drag the curve to change the starting point. Gold links show discrete steps, not continuous downhill motion.

0
Does the cost improve each step?Full runSteps taken
0-1.08101.71204.5307.294010.08IterationCost

At a glance

Accepts
Three objectives, starting point and learning rate
Outputs
Ball trajectory, cost history, gradients and next-step calculations
Where it runs
Entirely in your browser, on your device
What leaves your device
No calculation inputs are uploaded; standard site usage analytics still apply
Limits
One-dimensional presets; up to 40 iterations; stops before numerical overflow; plot window is finite
Account
Not required - there is no sign-up
Price
Free, with no watermark and no usage cap
Made by
Visrut
Last updated
14 October 2026

What to notice

Gradient descent repeatedly takes xₖ₊₁ = xₖ − ηJ′(xₖ). A negative gradient moves right; a positive gradient moves left. The learning rate η controls the step size.

For J(x) = x², rates between 0 and 1 converge. At η = 1 the point oscillates without shrinking; rates above 1 diverge unless started exactly at zero. For other curves, a safe rate depends on curvature and location.

A zero derivative can also occur at a maximum: starting at zero in the two-valley preset stays there. The algorithm does not know whether a stationary point is a minimum. The simulation stops before numerical overflow, and the displayed curve has a finite window.

Reference: gradient descent intuition

Frequently asked questions

Are these symbolic calculators?

These tools teach through supported function presets, exact derivatives and antiderivatives where supplied, and labelled numerical approximations. They do not evaluate arbitrary expressions.

Do calculations leave my device?

All graphs and calculations run locally in your browser. No account or external calculation service is required.