Cosine Annealing Scheduler Calculator

Visualize learning-rate curves without manual spreadsheets quickly here. Switch between classic and warm-restart strategies easily. Get the exact rate for each epoch instantly now.

Calculator

Pick a smooth decay, or periodic restarts.
Starting peak rate for the schedule.
Lower bound reached near the cosine trough.
Epoch where you want η(t).
Used only for the classic schedule.
Cap: 5000 epochs for speed.
First restart period length.
Cycle length grows by this factor each restart.
1 keeps peaks constant. Less than 1 reduces peaks.
Precision for rates in the table.
Downloads always include the full schedule.

Example data table

Use case ηmax ηmin Main setting Note
Classic training run 0.10 0.0001 T_max = 100 Best for one continuous training horizon.
Exploration with restarts 0.05 0.0001 T_0 = 10, T_mult = 2 Periodic peaks can escape sharp minima.
Restart peaks decay 0.05 0.0001 γ = 0.9 Gradually reduces peak learning rate over cycles.
Use these as starting points, then validate against your optimizer and batch size.

Formula used

Classic cosine annealing

η(t) = η_min + 0.5(η_max − η_min) · (1 + cos(π · t / T_max))

Warm restarts

η(t) = η_min + 0.5(η_max(cycle) − η_min) · (1 + cos(π · t_cur / T_i))

  • t_cur is the epoch index within the active cycle.
  • T_i is the active cycle length, starting at T_0 and multiplied by T_mult after each restart.
  • η_max(cycle) = η_max · γ^cycle applies optional peak decay per restart.

How to use this calculator

  1. Choose Classic cosine annealing for one training horizon, or Warm restarts for periodic cycles.
  2. Enter η_max and η_min that match your optimizer scale.
  3. Set t to the epoch you want to inspect.
  4. For classic mode, set T_max to total epochs.
  5. For restarts, set T_total, T_0, and T_mult. Use γ if you want peaks to shrink.
  6. Click Calculate. The results appear above the form, with a downloadable schedule.

Related Calculators

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.