Secretary Problem Calculator (Optimal Stopping)
Probability
- With 10 candidates interviewed in random order, the Optimal strategy is a threshold rule: reject the first s outright, then take the next candidate who beats everyone seen so far
- Scanning every threshold, the best is to reject the first 3 candidates, a threshold fraction of 0.300 of the pool
- That threshold gives the best possible success probability of 39.87 percent of hiring the single best of the 10 candidates
- For comparison, taking the first candidate succeeds only 10.00 percent of the time; as the pool grows the Optimal fraction settles near 1/e = 0.368
You may interview each candidate once, you must decide on the spot, and there is no going back. Under those austere rules - the classical secretary problem - there is a provably best strategy, and it has a memorable shape: reject the first portion of the pool outright, however dazzling, while noting the best among them; then hire the first later candidate who beats that benchmark. This calculator finds the optimal size of the rejection block for your pool by evaluating the exact success probability of every threshold, and reports the probability the best strategy buys you.
The answer surprises twice. First, the optimal block is large - a little over a third of the pool, spent purely on calibration. Second, the success probability is not near certainty but near 1/e, about 37 percent: even playing perfectly, you hire the single best candidate only a little more than a third of the time. Both surprises are theorems, and the exact harmonic-sum arithmetic on this page lets you watch them emerge for small pools instead of taking the asymptotics on faith.
Worked examples
10 candidates, reject 3
(10)
| Optimal candidates to reject outright | 3 |
| Success probability at the optimum (%) | 39.87 |
| Threshold fraction of the pool | 0.300 |
| Success probability taking the first candidate (%) | 10.00 |
50 candidates, reject 18
(50)
| Optimal candidates to reject outright | 18 |
| Success probability at the optimum (%) | 37.43 |
| Threshold fraction of the pool | 0.360 |
| Success probability taking the first candidate (%) | 2.00 |
100 candidates, reject 37
(100)
| Optimal candidates to reject outright | 37 |
| Success probability at the optimum (%) | 37.10 |
| Threshold fraction of the pool | 0.370 |
| Success probability taking the first candidate (%) | 1.00 |
The interview game and its rules
The rules are strict and worth stating, because every relaxation changes the answer. Candidates arrive in uniformly random order. Each can be ranked against all seen so far, but no absolute quality scale exists - only comparisons. A rejected candidate is gone forever; an accepted one ends the search. The goal is not a good candidate but the best candidate in the pool, outright. Under those rules any strategy is a threshold: some number s of initial rejections, then take the next record-breaker. The only question is s.
The problem circulated in the late 1950s and was popularised by Martin Gardner's Scientific American column in 1960; Ferguson's 1989 paper 'Who solved the secretary problem?' untangles a genuinely murky priority history. Its staying power comes from how much of real selection it captures in caricature - hiring, house-hunting, selling into a stream of offers - and from the elegance of its answer.
- Strategy: reject the first s candidates, then take the first who beats all of them.
- P(s) = (s/n) x the sum of 1/(i-1) for i from s+1 to n; the calculator maximises it exactly.
- As n grows, the optimal s/n and the success probability both tend to 1/e = 0.368.
The threshold strategy
Why a calibration block at all? Because 'best so far' is meaningless without a sample to define it. Reject too few and the benchmark is weak - you will pounce on a merely decent candidate early and never see the best. Reject too many and the best may be sitting inside the rejected block, unhireable, while the remaining pool offers only runners-up. The optimum balances the two failure modes, and the balance point is where the marginal candidate is as likely to be the wasted best as to be the sharpening of the benchmark.
The probability formula makes the trade computable. If the best candidate sits at position i, you hire them exactly when the best of the first i-1 candidates fell inside your rejected block - probability s/(i-1) - so the threshold's success rate is the average of those terms over all positions, weighted by 1/n. The calculator sums those fractions exactly for every s from 0 to n-1 and keeps the best, which is why its answers for small pools can be checked by hand.
| Worked example | Pool n | Reject first | Threshold fraction | Success probability | Taking the first candidate |
|---|---|---|---|---|---|
| 1 | 10 | 3 | 0.300 | 39.87% | 10.00% |
| 2 | 50 | 18 | 0.360 | 37.43% | 2.00% |
| 3 | 100 | 37 | 0.370 | 37.10% | 1.00% |
Worked examples: 10, 50 and 100 candidates
Ten candidates is the parlour version: reject 3, and the strategy hires the best 39.87 percent of the time - nearly four times the 10.00 percent of grabbing the first, and already close to the asymptotic ceiling. Fifty candidates is the realistic hiring slate: reject 18, success 37.43 percent. A hundred candidates - the full long-list - wants 37 rejections and returns 37.10 percent. The pattern is the theorem arriving: the optimal fraction climbs 0.300, 0.360, 0.370 toward 1/e while the success probability descends toward the same constant from above.
The flatness near the optimum is practically important and visible if you probe neighbouring thresholds: at n = 100, thresholds in the low-to-mid thirties all score within a few tenths of a point of the best. The strategy forgives approximate execution - you do not need to count to exactly 37 - which is just as well, since in real searches the pool size itself is an estimate. Robustness to both errors is part of why the 37 percent rule survives as advice outside the puzzle.
Why 1/e appears twice
The double appearance of 1/e is the problem's signature. In the large-pool limit, the success probability for a threshold fraction x becomes x times the integral of 1/t from x to 1, which is -x ln x. Maximising -x ln x over x gives x = 1/e, and the maximal value is -(1/e) ln(1/e) = 1/e itself. The optimal fraction and the optimal probability are the same number by the calculus of that one expression - a coincidence that is really a duality: the strategy spends a 1/e share of the pool to buy a 1/e chance at perfection.
The exact finite-pool answers on this page are the honest version of that limit. At n = 10 the asymptotic rule would suggest rejecting 3.68 candidates - impossible; the exact sum says 3, and prices the rounding at 39.87 against the limit's 36.79. Small pools beat the asymptote because discreteness lets the threshold sit closer to the best candidate's likely positions. The calculator exists for that gap between the famous constant and the actual integer answer.
Variants: known distributions and recall
Relax any rule and the problem transforms. If candidates can be recalled, the search becomes a question of how long to keep looking, and thresholds are set in quality rather than in count. If quality is measurable on an absolute scale with a known distribution, the optimal rule is a declining sequence of acceptance thresholds computed by backward induction - the same mathematics that prices American options. If the pool size is unknown, the threshold is set in time or in a prior over counts. Each variant is a small literature; the classical problem remains the benchmark because its rules are the harshest and its answer the cleanest.
The full-information and rank-based variants also split on what 'success' means: the best candidate outright, a top-decile candidate, or the maximum expected quality of the hire. The calculator stays with the classical definition - nothing but the best counts - which is the version whose 1/e answer made the problem famous. Knowing which game you are actually playing is the first step of applying any of them.
Using the rule outside the puzzle
Real searches that resemble the rules - a stream of one-shot offers, no recall, comparative judgement only - inherit the strategy's shape if not its constant: spend a deliberate first tranche on calibration, define the benchmark, then commit quickly when it is beaten. House-hunting in a fast market and hiring against a closing window both rhyme with the model. Where the rhyme breaks - recall is usually possible, quality is partially measurable, the pool is not uniformly random - the rule degrades gracefully into a heuristic: calibrate longer than feels comfortable, then stop deliberating once the benchmark falls.
One more feature of the exact table deserves a look, because it reverses a common intuition: small pools are easier, not harder, relative to the ceiling. The 10-candidate game pays 39.87 percent against the 100-candidate game's 37.10, even though the small game offers far less information to calibrate with. The reason is granularity - with few candidates, the best is likely to sit late enough to be catchable and the threshold can be placed with relatively finer precision. The asymptotic 37 percent is a floor the finite games approach from above, which is a pleasant direction for a limit to err.
FAQs
With 10 candidates, how many should I reject before starting to take the best-so-far?
3 - and the strategy hires the best candidate 39.87 percent of the time.
With 50 candidates?
Reject the first 18 (a fraction 0.360); the success probability is 37.43 percent.
With 100 candidates?
Reject 37, for a 37.10 percent chance of hiring the single best.
Why not reject half the pool?
The optimum balances calibration against running out of candidates: it sits near 1/e of the pool, 0.370 at 100 candidates, not at a half.
How much better is the optimal rule than taking the first candidate?
At 10 candidates, 39.87 percent against 10.00 percent; at 100, 37.10 percent against 1.00 percent.
Does the success chance keep falling as the pool grows?
It converges to 1/e, about 36.8 percent: 39.87 at 10, 37.43 at 50, 37.10 at 100.