Expected Frequency Calculator
Expected frequency is the count you would expect in a category if a hypothesis were true: what a fair die, an independence assumption or a probability model predicts before you compare it with what you actually counted. This calculator covers all four standard forms: contingency-table cells for chi-square tests, probability expectations, binomial successes and the Poisson mean, with an optional observed count that adds the cell’s chi-square contribution. It has nothing to do with credit risk: the similarly named expected default frequency is a firm’s default probability, covered by the expected default frequency (EDF) calculator.
Enter what you actually counted to get the chi-square contribution.
Quick Answer
In a survey of 200 people where the row total is 120 and the column total is 100, the expected frequency for that cell is (120 × 100) ÷ 200 = 60. If you actually observed 70, the cell's chi-square contribution is (70 − 60)² ÷ 60 = 1.66667. Expected frequencies are theoretical averages, so a decimal answer like 33.33333 is normal and correct.
Key takeaways
- Expected frequency is a prediction under a hypothesis, not a count. The gap between it and the observed count is what chi-square tests judge.
- One formula family covers most uses: totals times probability, or row times column over grand total for tables.
- Expected counts may be decimals and must add back up to your totals. If they do not, an input is wrong.
- Small expected counts are the weak point of chi-square tests. The tool warns below 5, and the honest rule behind that warning is explained below.
- Quick Answer
- How to use the expected frequency calculator
- The four expected frequency formulas
- Worked example: a full 2×2 survey table
- The below-5 warning, stated honestly
- What this calculator does not do
- What competing calculators miss
- Frequently asked questions
- Add This Calculator to Your Website
- References
How to use the expected frequency calculator
Choose the tab that matches your problem, enter the totals or the probability, then click Calculate. Results stay hidden until you do.
- Contingency table: for one cell of a two-way table, enter its row total, its column total and the grand total.
- Probability: for a category with a known probability, enter total observations N and the probability p as a decimal.
- Binomial: for repeated trials, enter the number of trials n and the success probability p. The arithmetic is the same N × p shape, framed as successes.
- Poisson: for counts per interval, enter lambda, the average rate. The expected frequency is lambda itself, because lambda is the distribution's mean.
- Observed frequency (optional, all tabs): add what you actually counted and the result gains that cell's chi-square contribution, (O − E)² ÷ E.
The probability framing connects to the wider family: a category probability is often itself a conditional probability read from an earlier stage of the problem, and binomial and Poisson counts are the two workhorse cases of a discrete probability distribution, each with its own mean.
The four expected frequency formulas
Each mode is one line of arithmetic. The differences are in where the probability comes from, not in the idea:
Probability: E = N × p
Binomial: E = n × p (expected successes in n trials)
Poisson: E = λ (the mean of the distribution)
Chi-square contribution: (O − E)² ÷ E
| Mode | Use it when | Example run | E |
|---|---|---|---|
| Contingency table | Testing whether two categorical variables are independent | (120 × 100) ÷ 200 | 60 |
| Probability | A category has a stated probability under the hypothesis | 120 × 0.25 | 30 |
| Binomial | Counting successes across repeated identical trials | 50 × 0.3 | 15 |
| Poisson | Events arrive at an average rate per interval | λ = 4.5 | 4.5 |
A die shows why decimals and rounding deserve care. Rolling a fair die 60 times gives each face a probability of 1/6, so the true expectation is exactly 10 per face. Type the probability as 0.1667, as most people do, and the tool returns 10.002, because that is the honest product of the numbers entered. The tool rounds its display to five decimal places and never silently corrects your inputs, which is the right behaviour for coursework and for real tests alike.
Worked example: a full 2×2 survey table
Two hundred people are surveyed by gender and whether they answered Yes to a product question. Under independence, every cell's expected count follows from the margins alone:
| Cell | Observed (O) | Expected (E) | (O − E)² ÷ E |
|---|---|---|---|
| Male, Yes (row 120, column 100) | 70 | 60 | 1.66667 |
| Male, No (row 120, column 100) | 50 | 60 | 1.66667 |
| Female, Yes (row 80, column 100) | 30 | 40 | 2.5 |
| Female, No (row 80, column 100) | 50 | 40 | 2.5 |
Run the tool once per cell, entering that cell's row total, column total and observed count each time. The expected counts check themselves: 60 + 60 = 120 down the Male row and 40 + 40 = 80 down the Female row, matching the margins, which is the same totals logic a distribution frequency calculator applies to one-way tables. The four contributions add to about 8.33. On 1 degree of freedom, that passes the 3.84 critical value at the 5% level, so this survey would reject independence. The tool deliberately stops at the per-cell building blocks: the degrees of freedom and the p-value belong to the full test, and they depend on the whole table, not on one cell.
The below-5 warning, stated honestly
The tool warns whenever an expected frequency falls below 5, in any mode. The warning exists because the chi-square distribution is an approximation, and it degrades when expected counts get tiny.
The textbook version of the rule, all expected counts at least 5, is a simplification. Cochran's original 1954 guidance was more precise: for larger tables, no expected count below 1 and no more than about 20% of cells below 5; for a single 2×2 table his advice was stricter. Practical work follows the middle course the warning points to: if a few cells sit between 1 and 5, treat the p-value with care; if cells fall below 1, combine categories or switch to an exact test. In Poisson mode the same warning reads differently: lambda under 5 simply flags a small mean, where the normal approximation to the Poisson is weak and exact Poisson probabilities are the safer tool. Expected value thinking runs through all of this: an expectation is a probability-weighted average, the same construction a conditional expected value calculator applies when the average is taken over part of a distribution.
What this calculator does not do
It computes expected frequencies and single-cell chi-square contributions. It does not run the complete chi-square test: there is no p-value, no degrees-of-freedom calculation and no significance verdict, because those need every cell of the table at once. Enter totals that cannot coexist, such as a row total larger than the grand total, and the tool will still do the arithmetic and return a number larger than your sample. That is by design: the tool is a calculator, not a data validator, and the margin check in the worked example above is the reader's job. Software such as the SciPy chisquare function documented by the SciPy project takes the next step when you have the full set of observed and expected counts in code.
What competing calculators miss
- Full chi-square suites (Statulator, online chi-square test tools): they run the whole test and report a p-value, which is genuinely useful, but they bury the expected counts inside a results table and offer no standalone probability, binomial or Poisson expectation modes.
- Guide pages (AEANET, NumberAnalytics): clear formula walkthroughs with worked tables, and nothing to calculate with. Every new set of margins means redoing the arithmetic by hand.
- Documentation examples (SciPy chisquare): exact and authoritative, but they assume you are writing Python and already have both observed and expected arrays.
- The gap this page fills: the expected count itself, in all four modes, with the formula and substitution shown for every run, the chi-square contribution from any observed count, and an automatic below-5 warning that none of the expected-frequency tools we checked surface at all.
Frequently asked questions
Expected frequency is the number of times you would expect an outcome to occur if the hypothesis you are testing were true. In its simplest form it is the total number of observations multiplied by the probability of the category. It is a theoretical average, not a count of anything that has happened yet.
Multiply the cell's row total by its column total and divide by the grand total: E = (row x column) / grand. A row total of 120, a column total of 100 and a grand total of 200 give E = 60. Every cell gets its own calculation from its own row and column totals.
Observed frequency is what you actually counted in your data. Expected frequency is what the hypothesis predicts you should have counted. Chi-square tests measure the gap between the two, cell by cell, using (O - E) squared divided by E, summed over all cells.
Yes, and it usually is. Expected frequencies are theoretical averages, so a value like 23.4 is valid even though observations only ever come in whole numbers. This calculator displays up to five decimal places, so a repeating value such as 100 x 100 / 300 appears as 33.33333.
Because the chi-square distribution is an approximation, and it breaks down when expected counts are tiny. The strict textbook rule asks for every expected count to reach 5, while Cochran's original guidance allows a minority of cells between 1 and 5 in larger tables, provided none falls below 1. This calculator warns below 5 in every mode so you can decide whether to combine categories or use an exact test.
Yes. Across a full row, column or table, the expected frequencies must add back up to the same totals as the observed data. In the worked example above the Male row's expected counts, 60 and 60, sum to its row total of 120. If your expected counts do not reconcile this way, one of the totals you entered is wrong.
No. It computes expected frequencies for one cell or category at a time, plus that cell's chi-square contribution when you enter an observed count. A full test also needs the contributions from every cell, the degrees of freedom and a p-value, which depend on the whole table. Run the tool once per cell and add the contributions to build the test statistic.
They are unrelated measures that share two words. Expected frequency is a statistics count: how many observations a hypothesis predicts in a category. Expected default frequency is a credit-risk probability: the percentage chance that a firm defaults over a horizon, from the Merton model. This page covers the statistics count only.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- Pearson, K. On the Criterion That a Given System of Deviations from the Probable in the Case of a Correlated System of Variables Is Such That It Can Be Reasonably Supposed to Have Arisen from Random Sampling, Philosophical Transactions of the Royal Society A, 1900. Accessed October 21, 2026.
- Cochran, W. G. Some Methods for Strengthening the Common Chi-Square Tests, Biometrics, 1954. Accessed October 21, 2026.
- Yates, F. Contingency Tables Involving Small Numbers and the Chi-Square Test, Supplement to the Journal of the Royal Statistical Society, 1934. Accessed October 21, 2026.
- OpenStax, Rice University. Introductory Statistics 2e, Section 11.3: Test of Independence. Accessed October 21, 2026.
- SciPy Project. scipy.stats.chisquare documentation (observed and expected frequencies, small-count validity notes). Accessed October 21, 2026.
- The Analysis Factor. Chi-Square Test of Independence: where the expected-count rules of thumb come from (summary of Cochran, Campbell and Minitab criteria). Accessed October 21, 2026.
- National Institute of Standards and Technology. NIST/SEMATECH e-Handbook of Statistical Methods, Section 7.4.5: chi-square test of independence and expected cell frequencies. Accessed October 21, 2026.
