Statistics and research
Cohen’s kappa calculator
Agreement between two raters beyond chance: Cohen’s κ, linear or quadratic weighted κ, standard error, confidence interval and z-test.
Runs in your browser. What you enter stays on this page and is not uploaded.
Results
- Observed agreement pₒ
- 0.7
- Chance agreement pₑ
- 0.5
- Cohen’s κ
- 0.4
- Standard error (Fleiss, Cohen and Everitt 1969)
- 0.126996
- 95% confidence interval
- 0.151092 to 0.648908
- z test of κ = 0 (null SE)
- z = 2.88675, p 0.003892
- Maximum κ given the marginals
- 0.8
- Strength (Landis and Koch 1977)
- fair
- Ratings n
- 50
Rows are rater A’s categories and columns rater B’s, in the same order. Weighted kappa treats the categories as ordered.
Method and limits
How to use it
Enter the agreement table: rater A’s categories as rows, rater B’s as columns, in the same order, with the number of cases in each cell. Use weights only for ordered categories (for example severity grades).
Formulas
- Observed agreement po = Σ wij pij; chance agreement pe = Σ wij pi· p·j; κ = (po − pe) / (1 − pe).
- Weights: 1 on the diagonal and 0 elsewhere (unweighted); 1 − |i − j|/(k − 1) (linear); 1 − (i − j)²/(k − 1)² (quadratic).
- Standard error for the interval: Fleiss, Cohen and Everitt (1969); the z-test of κ = 0 uses their null standard error.
Assumptions and limits
- The same cases rated independently by two raters into the same set of categories. For more than two raters use Fleiss’ kappa.
- κ depends on how common each category is: with very unbalanced marginals κ can be low despite high raw agreement (the maximum attainable κ is shown).
- Landis and Koch’s labels (0.21–0.40 fair, 0.41–0.60 moderate, 0.61–0.80 substantial) are conventions, not tests.
Worked example
Two raters classify 50 cases: both yes 20, A yes and B no 5, A no and B yes 10, both no 15. po = 0.70, pe = 0.50, κ = 0.40 (95% CI 0.15 to 0.65), fair agreement. The calculator also reproduces vcd::Kappa for R’s SexualFun table: 0.1293 (ASE 0.0686) unweighted and 0.2374 (ASE 0.0783) with linear weights.
References
- Cohen (1960), A coefficient of agreement for nominal scales, Educational and Psychological Measurement 20(1)
- Cohen (1968), Weighted kappa, Psychological Bulletin 70(4)
- Fleiss, Cohen and Everitt (1969), Large sample standard errors of kappa and weighted kappa, Psychological Bulletin 72(5)
- Landis and Koch (1977), The measurement of observer agreement for categorical data, Biometrics 33(1)
Related tools
- Chi-square test of independence calculatorChi-square test for a contingency table of counts: expected counts, adjusted residuals, likelihood-ratio G², Cramér’s V and Yates’s correction for 2×2.
- Chi-square goodness-of-fit calculatorTest whether observed category counts fit equal or specified expected proportions, with each category’s contribution and residual.
- Fisher’s exact test calculatorExact test for a 2×2 table: two-sided and one-sided p-values, the conditional maximum likelihood odds ratio and its exact confidence interval.
- Effect size calculatorCohen’s d, Hedges’ g and Glass’s Δ from group means, or odds ratio, risk ratio and risk difference from a 2×2 table, each with confidence intervals.
- Cronbach’s alpha calculatorInternal-consistency reliability of a scale: Cronbach’s α with Feldt’s confidence interval, standardized α and α-if-item-deleted for each item.
- Correlation coefficient calculatorPearson’s r and Spearman’s rank correlation ρ for paired data, with p-values, r² and a confidence interval for r.