Secretary Problem Calculator
Find the optimal number of applicants to reject before accepting the next best one, and your chance of success.
What it does
You must hire one applicant from a pool of n. They arrive in random order, you can rank them only relative to those you have already seen, and a rejection is final. The secretary problem asks for the rule that maximises the chance of hiring the single best applicant in the pool.
The answer has a surprising shape. There is a threshold: reject the first r applicants no matter how good they look, remember the best of them, and then accept the first later applicant who beats that benchmark. If nobody beats it, the last applicant is taken by default. The only decision is how large r should be.
For a given r and n, the success probability is r over n times the sum from k equals r to n minus one of one over k. The Encyclopedia of Mathematics states this expression and notes that the best fraction of applicants to skip approaches 1 over e for large n. Stanford lecture notes derive the same formula by conditioning on the best applicant arriving at position i.
The number 1 over e is about 0.3679, so the familiar shortcut is to skip the first 37 percent of candidates and then take the next record holder. The catch is that this strategy succeeds only about 37 percent of the time, even in an ideal world. Rejecting fewer candidates makes you trigger too early, and rejecting more means the best applicant may already have gone.
This tool evaluates the probability for every possible threshold, up to a cap of one million applicants, and reports the best one. It also shows the limiting value so you can see how quickly the exact answer settles near 1 over e as the pool grows.
How to use
- Enter the number of applicants in the pool as a whole number.
- Read how many applicants to reject before you start considering offers.
- Use the probability to understand how often the rule actually picks the best one.
- Check the large group limit to see the value the probability approaches.
- Apply the rule by ranking only against applicants already seen, not against an outside standard.
- Remember that the rule assumes a random arrival order and no ability to recall a rejected applicant.
Formula
- n
- Number of applicants in the pool.
- r
- Number of applicants rejected before accepting a record holder.
- P(n,r)
- Probability that the rule selects the single best applicant.
- e
- Base of the natural logarithms, about 2.71828.
The formula comes from summing over the position i of the best applicant. That applicant is selected only if its position is after r and the best of the first i minus one applicants lies within the first r positions, which has probability r over i minus one. Multiplying by the chance 1 over n that the best applicant is at position i and summing gives the expression above. Special cases: with one applicant r is zero and success is certain, and with two applicants either r works and the chance is one half.
Worked example
Example: 100 applicants
Default: n = 100 applicants in uniformly random order.
- For each possible threshold r, compute P = (r / 100) x sum from k=r to 99 of 1/k.
- Trying r = 36 gives a probability just below the best value.
- Trying r = 37 gives the largest value, about 0.37104.
- Trying r = 38 starts to decrease the probability, so 37 is optimal.
- The rule is to reject the first 37 applicants, note the best of them, then accept the first later applicant who is better.
- The success chance is 0.3710, or 37.10 percent, a little above the large group limit of 0.3679.
- The tool shows 37, 0.3710, 37.10 % and 0.3679.
Reference table
| Applicants n | Reject first r | Probability | Long run limit |
|---|---|---|---|
| 2 | 1 | 0.5000 | 0.3679 |
| 3 | 1 | 0.5000 | 0.3679 |
| 10 | 3 | 0.3987 | 0.3679 |
| 100 | 37 | 0.3710 | 0.3679 |
| 1000 | 368 | 0.3682 | 0.3679 |
Limits
- Assumes the number of applicants is known before the search starts.
- Assumes a random arrival order and a strict ranking with no ties.
- Assumes you can judge relative rank but not absolute quality, and that rejected applicants cannot be recalled.
- The rule maximises the chance of getting the best, not the average quality of the person chosen.
Common mistakes
- Treating 37 percent as a target success rate rather than a fraction of applicants to skip.
- Rejecting a fixed count regardless of the size of the pool.
- Assuming the rule improves your expected satisfaction, when it only targets the single best outcome.
- Forgetting that the best applicant may appear during the observation phase and be lost.
- Applying the rule when candidates can be recalled or when absolute scores are visible.
Try it yourself
Quick checks. Answers sit tucked under each question.
There are 10 applicants. What does the rule say?
Reject the first 3, then take the next applicant better than all of them. The success probability is 0.3987, or 39.87 percent.
Only 3 applicants are available. What is the best rule?
Reject the first 1 and accept the next record holder. The chance of picking the best is 0.5000, or 50.00 percent.
With 1000 applicants, what changes?
Reject 368, then take the first record holder. The probability is about 0.3682, very close to the 0.3679 limit.
Questions
Why is the answer about 37 percent?
It is 1 over e, the value that maximises the limiting expression x log of 1 over x. Skipping a smaller fraction stops too early and skipping more loses too many good applicants.
Does this rule work for real hiring?
Only as a rough guide. Real interviews reveal absolute quality, candidates can decline offers, and recall is sometimes possible, all of which change the best strategy.
Why does the success chance stay near 37 percent for large pools?
Even with an optimal threshold, the best applicant has a 1 over e chance of appearing during the observation phase, when the rule is forced to pass.
What happens if there are ties?
The classical result assumes a strict ranking. Ties need a revised rule and this calculator does not cover them.
Is this the same as the marriage problem?
Yes. The same mathematical structure appears under several names, including the sultan's dowry problem and the best choice problem.
Does the rule pick a good applicant on average?
It is designed to maximise the chance of the very best. Other stopping rules give a higher average rank with a lower chance of the top spot.
Sources
- Encyclopedia of Mathematics: Secretary problem, optimal stopping formulation
- Stanford MS&E 317 Lecture 8: Secretary problem derivation
- Statistical Science: Who Solved the Secretary Problem, by Thomas Ferguson