Skip to content
ENExplore Calculators

Random Search Budget Calculator

Work out random search budget instantly with clear inputs, formula shown and shareable results.

About Random Search Budget Calculator

Each random draw has probability p of landing in the top p fraction of configurations, so the chance of missing it n times is (1-p)^n. Solving for the trial count gives n = ln(1 - confidence) / ln(1 - p), which famously yields about 60 trials for a top-5-percent configuration at 95 percent confidence — and crucially that number does not depend on how many hyperparameters there are.

Formula

Random search budget

n = ln(1 - confidence) / ln(1 - p); expected best percentile ~ 100 / (n + 1)

Worked example

With the default values below, Random Search Budget Calculator returns Random trials required of 59. Change any input above and every figure here is recalculated in your browser.

Inputs used

Target percentile of the search spaceaccepts 0.01–50 %
5 %
Confidence of finding itaccepts 50–99.99 %
95 %
Size of the equivalent gridminimum 2
1,024

Results

Random trials required
59
Chance each trial lands in the target band
5.000%
Trials saved versus a full grid
94.24%
Expected percentile of the best trial found
1.6667%

Step by step

  1. 1Values used
  2. 2Random search budget
  3. 3Random trials required= 59
  4. 4Chance each trial lands in the target band= 5.000
  5. 5Trials saved versus a full grid= 94.24
  6. 6Expected percentile of the best trial found= 1.6667

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why does dimensionality not appear in the formula?

Because the target is defined as a fraction of the space, not a specific point. Adding dimensions makes the space larger but the top 5 percent is still 5 percent of draws.

Should ranges be sampled linearly?

Sample learning rates and regularisation strengths log-uniformly. Linear sampling of a range spanning several orders of magnitude wastes almost every draw on the largest decade.

Random Search Budget Calculator | Calcrivo