# Chi-Square & ANOVA Calculator - Tukey HSD, Kruskal–Wallis

> Chi-square goodness of fit and independence (Yates, Fisher exact, Cramér’s V), one-way and two-way ANOVA, Tukey HSD, Kruskal–Wallis and Levene’s test.

- URL: https://qilingtools.com/en/math/anova
- Category: Math Tools (https://qilingtools.com/en/math)
- Tags: [Math](https://qilingtools.com/en/tags/math), [Statistics](https://qilingtools.com/en/tags/statistics)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

The tests you reach for most in theses, lab reports and survey analysis, on one page. Chi-square goodness of fit: enter observed counts and expected ratios (blank means uniform, and you can subtract parameters estimated from the data) to get expected counts, (O−E)²/E, standardized residuals, χ², degrees of freedom and the p-value — Mendel’s 9:3:3:1 peas are the built-in example. Test of independence: a contingency table editor up to 10×10 that accepts pasted Excel blocks, reporting expected counts, adjusted residuals (cells beyond ±1.96 are coloured so you can see where the association comes from), Pearson χ², the likelihood-ratio G², Cramér’s V with an effect-size label, and for 2×2 tables the Yates correction, φ, the odds ratio and Fisher’s exact test (two-sided and one-sided). One-way ANOVA: paste one group per line to get descriptive statistics, the full ANOVA table (SS, df, MS, F, p), η² and ω², and a plot of group means with 95% confidence intervals; Tukey HSD post-hoc comparisons (Tukey–Kramer for unequal sizes) use p-values from numerical integration of the studentized range distribution, alongside Levene / Brown–Forsythe tests for equal variances and the non-parametric Kruskal–Wallis test with tie correction. Two-way ANOVA handles balanced designs with or without replication, giving main effects, the interaction, partial η², cell means and an interaction plot. Every test comes with a plain-language interpretation, and the numbers have been checked against R’s chisq.test, aov, TukeyHSD, kruskal.test and car::leveneTest.

## How to use

1. Pick a test: one-way or two-way ANOVA, contingency table, or goodness of fit
2. Paste or type your data (Excel blocks work) and choose the significance level α
3. Read the statistic, p-value, effect size, post-hoc comparisons, assumption checks and the written interpretation

## Features

- Goodness of fit with custom expected ratios and estimated parameters
- Independence test: expected counts, adjusted residuals, Cramér’s V
- 2×2 tables: Yates correction, Fisher’s exact test, odds ratio
- Full one-way ANOVA table with η² and ω²
- Tukey HSD with an exact studentized range distribution
- Levene and Brown–Forsythe tests for equal variances
- Kruskal–Wallis test with tie correction
- Two-way ANOVA with or without replication, plus an interaction plot

## FAQ

### When should I use a chi-square test and when ANOVA?

It depends on the outcome. If you’re comparing counts in categories — how many men and women vote for each party — use a chi-square test. If you’re comparing the average of a continuous measurement — crop yield under three fertilizers — use ANOVA. With exactly two groups, one-way ANOVA is equivalent to the equal-variance t-test (F = t²).

### What if some expected counts are below 5?

The chi-square test relies on a large-sample approximation; the usual rule is that every expected count is at least 1 and at least 80% are 5 or more. If not, use Fisher’s exact test for a 2×2 table, which needs no approximation; for larger tables, merge similar categories or collect more data. The tool warns you how many cells fall below 5.

### Why run Tukey HSD after a significant ANOVA?

The F-test only says that at least one group differs, not which. Running a t-test for every pair inflates the chance of a false positive well beyond α as the number of comparisons grows. Tukey HSD uses the studentized range distribution to control the family-wise error rate, giving adjusted p-values and simultaneous confidence intervals — the standard way to compare all pairs.

### What if variances are unequal or the data aren’t normal?

Check Levene’s test first: p < α means the group variances differ. ANOVA copes fairly well with that when group sizes are similar; with very unequal sizes, strong skew or outliers, look at the Kruskal–Wallis test, which uses only the ranks and assumes neither normality nor equal variances. Both results are shown side by side.

## Related tools

- [Graphing Calculator](https://qilingtools.com/en/math/graph): Free online function graphing calculator: type sin(x), x^2 or 1/x and see the curve at once, with several functions, parametric and polar curves, PNG export.
- [Scientific Calculator](https://qilingtools.com/en/math/calculator): Free online scientific calculator: type 2*(3+4)^2, sin(pi/6) or log(8,2) and see the answer as you type, with degrees or radians and a history list.
- [Equation Solver](https://qilingtools.com/en/math/equation): Free online equation solver: enter coefficients for linear, quadratic (with discriminant, vertex and complex roots) and cubic equations, plus 2×2 systems.
- [Fraction Calculator](https://qilingtools.com/en/math/fraction): Free online fraction calculator: add, subtract, multiply and divide fractions with automatic reduction, plus fraction ↔ decimal with repeating digits.
- [Percentage Calculator](https://qilingtools.com/en/math/percentage): Free online percentage calculator: X% of Y, X as a percent of Y, increase and decrease, a value after a percentage change and the original behind it.
- [Prime Factorization](https://qilingtools.com/en/math/prime): Free online prime factorization: factor an integer with exponents, list every divisor and their sum, test primality with neighbouring primes, or list a range.
- [GCD and LCM](https://qilingtools.com/en/math/gcd-lcm): Free online GCD and LCM calculator: works with two or more integers, says whether they are coprime, shows each prime factorization and every Euclidean step.
- [Statistics Calculator](https://qilingtools.com/en/math/statistics): Free online statistics calculator: paste a data set for the mean, median, mode, range, quartiles, variance, standard deviation, standard error and outliers.
