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.

Rows: rater A’s categories; columns: rater B’s, in the same order. One row per line.

Results

Cohen’s κ0.495% CI0.151 to 0.649p-value0.003892
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

Related tools

Share this page

Remind me to visit Contifield

Adds a repeating reminder to your calendar, titled “Contifield Reminder: Visit www.contifield.com”.