01
Cohen's kappa formula
κ = (pₒ − pₑ) ÷ (1 − pₑ)
pₒ is the observed agreement: the share of items on the diagonal of the table. pₑ is the agreement expected by chance: for each category, multiply the share rater A gave it by the share rater B gave it, and add the products up.
02
Worked example
Two raters classify 50 items as yes or no.
| B: yes | B: no | |
|---|---|---|
| A: yes | 20 | 5 |
| A: no | 10 | 15 |
pₒ = (20 + 15) ÷ 50 = 0.70
pₑ = (25 ÷ 50)(30 ÷ 50) + (25 ÷ 50)(20 ÷ 50) = 0.30 + 0.20 = 0.50
κ = (0.70 − 0.50) ÷ (1 − 0.50) = 0.40
The 95% confidence interval is 0.15 to 0.65.
03
Interpreting kappa
| Kappa | Agreement (Landis and Koch, 1977) |
|---|---|
| below 0 | poor |
| 0.00 to 0.20 | slight |
| 0.21 to 0.40 | fair |
| 0.41 to 0.60 | moderate |
| 0.61 to 0.80 | substantial |
| 0.81 to 1.00 | almost perfect |
These bands are a convention, not a rule; many clinical fields ask for more. Kappa also falls when one category is rare, even if raw agreement is high, so report the observed agreement with it.
04
Common mistakes with Cohen’s kappa
- Reporting percentage agreement alone. The raters in the example agree on 70% of the items, but kappa is only 0.40 once the 50% expected by chance is taken out.
- Overlooking a rare category. In the table 45, 2 / 2, 1 the raters agree on 92% of 50 items, yet kappa is 0.29, with a 95% interval from −0.38 to 0.96.
- Unweighted kappa for ordered categories. For the 3 × 3 rating table 10, 4, 1 / 3, 12, 5 / 1, 4, 10, unweighted kappa is 0.45; quadratic weighting, which counts a near miss as partly right, gives 0.60.
Trust
How this page is checked
- The calculation runs on code with automated tests against worked reference values. Every number in the examples on this page was produced by that same code, not typed by hand.
- The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
- Sources: Cohen (1960), A coefficient of agreement for nominal scales; Landis and Koch (1977), The measurement of observer agreement for categorical data.
- Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.
Cite this page
Sciloom. (2026). Cohen's kappa calculator. Zebra Nine Studio Inc. https://sciloom.si/cohens-kappa-calculator
Frequently asked questions
Why not just report percent agreement?
Two raters guessing at random would still agree part of the time. Kappa subtracts that chance agreement, so it shows how much better than guessing the raters did.
Can kappa be negative?
Yes. A negative value means the raters agreed less often than chance would predict, which usually points to a systematic disagreement or a coding mix-up.
What if there are more than two raters?
Cohen's kappa is for exactly two. Use Fleiss' kappa for three or more raters.
My categories are ordered. Is plain kappa right?
Plain kappa treats every disagreement as equally bad. For ordered categories, weighted kappa gives partial credit for near misses and is usually the better choice. The calculator shows linear and quadratic weighted kappa once you have three or more categories.