Cohen's Kappa: How to Calculate and Interpret It (with Examples)
Cohen's kappa measures how far two coders agree beyond the agreement you would expect by chance: κ = (pₒ − pₑ) / (1 − pₑ), where pₒ is the share of items they coded the same and pₑ the share expected if each coded at random at their own rates. A kappa of 1 is perfect agreement and 0 is chance level. Interpret it with its confidence interval and the agreement table, not with verbal labels alone, because the same percentage agreement can give very different kappas.
Last updated · by the simstat.com editorial team · How we write
Why raw agreement is not enough
When two people code the same material with the same codebook, the obvious summary is the percentage of items on which they chose the same code. The trouble is that some of that agreement would happen even if neither coder paid attention. Hallgren (2012) gives an illustration: if two coders labelled 10% of people “depressed” and 90% “not depressed” at random, they would be expected to agree on 82% of them. Percentage agreement therefore flatters coders whenever one category is common.
Kappa (κ), which McHugh (2012) traces to Cohen (1960), removes that chance component. It asks a sharper question: of the agreement that was possible beyond chance, how much did the coders actually achieve? A kappa of 1 means perfect agreement, 0 means no more agreement than chance, and negative values mean less agreement than chance. Negative values are possible but, as McHugh (2012) notes, unlikely in practice.
The intuition
Lay out the codes in an agreement table (a contingency table): rater A’s category in the rows, rater B’s in the columns, and the number of items in each cell. The diagonal cells are agreements.
“Chance” in kappa has a specific meaning. Imagine each coder keeps their own habits, how often they use each category, but assigns categories to items independently of the other coder. Then the expected share of items on which both pick category i is the product of their two usage rates for i. Hallgren (2012) puts it this way: the agreement expected by chance “is determined by the marginal frequencies of each coder’s ratings”. Adding up those products over categories gives the chance agreement. Kappa compares what you observed with that baseline and rescales so that perfect agreement is 1.
The formula
With n items and nᵢⱼ items in row i and column j, write pᵢⱼ = nᵢⱼ / n for the cell proportions, pᵢ₊ for the row totals (rater A’s usage rates) and p₊ⱼ for the column totals (rater B’s). Then
Here pₒ is the observed agreement (the diagonal), pₑ is the agreement expected by chance, the numerator is the agreement achieved beyond chance and the denominator is the most that could have been achieved beyond chance.
Weighted kappa, which the psych documentation (Revelle, 2024) and Hallgren (2012) attribute to Cohen (1968), gives partial credit to near-misses. Each cell gets an agreement weight wᵢⱼ between 0 and 1, with 1 on the diagonal:
Unweighted kappa is the special case where wᵢⱼ is 1 on the diagonal and 0 everywhere else.
A worked example
The R psych documentation (Revelle, 2024) reproduces a three-category agreement table “taken from Cohen”, printed as cell proportions, and notes the kappa and weighted kappa that Cohen reports for it; the weighted value places it in Cohen’s (1968) paper. The documentation’s example analyses the table as 200 items. Multiplied by 200, the proportions are whole counts, which is what you would type into a calculator.
Worked example: kappa and weighted kappa for Cohen's 1968 table
| Rater A ↓, rater B → | Category 1 | Category 2 | Category 3 | Row total |
|---|---|---|---|---|
| Category 1 | 88 | 14 | 18 | 120 |
| Category 2 | 10 | 40 | 10 | 60 |
| Category 3 | 2 | 6 | 12 | 20 |
| Column total | 100 | 60 | 40 | 200 |
Observed agreement. The diagonal holds 88 + 40 + 12 = 140 items, so pₒ = 140 / 200 = 0.70.
Chance agreement. Multiply matching row and column totals: pₑ = (120 × 100 + 60 × 60 + 20 × 40) / 40,000 = 16,400 / 40,000 = 0.41.
Kappa. κ = (0.70 − 0.41) / (1 − 0.41) = 0.29 / 0.59 = 0.492. The raters achieved about 49% of the agreement that was possible beyond chance. The psych documentation gives Cohen’s value as .492.
Uncertainty. The large-sample standard error is 0.051, so the 95% interval is 0.492 ± 1.96 × 0.051, from 0.392 to 0.591.
Weighted kappa with Cohen’s own weights. The psych documentation also lists the disagreement weights Cohen used for this table: 0 on the diagonal and from 1 to 6 off it, a larger weight counting as a worse disagreement. Rescaled to agreement weights (1 minus the disagreement weight divided by 6) they are:
| Rater A ↓, rater B → | Category 1 | Category 2 | Category 3 |
|---|---|---|---|
| Category 1 | 1 | 0.833 | 0.5 |
| Category 2 | 0.833 | 1 | 0 |
| Category 3 | 0.5 | 0 | 1 |
Then pₒ₍w₎ = 0.850, pₑ₍w₎ = 0.770 and κw = 0.348 (SE 0.076, 95% interval 0.200 to 0.496). The psych documentation gives Cohen’s value as .348.
The weighted value is lower than the unweighted one, which surprises people who think of weighting as a way of being lenient. Partial credit raises observed agreement (from 0.70 to 0.850) but raises chance agreement much more (from 0.41 to 0.770), so less of the possible agreement beyond chance is achieved. All of these numbers are computed by the code behind our calculator each time the page is built. Choose 3 categories and weighting “None”, type in the nine counts, and you get the same kappa, agreement and interval. To reproduce Cohen’s weighted value, keep the counts, choose weighting “Custom” and type the agreement weights from the table above into the weight matrix (the diagonal is fixed at 1): the calculator gives κw = 0.348, with 95% interval 0.200 to 0.496, and lists the weights it used in the worked calculation.
Weighted kappa for ordered categories
When categories have a natural order, such as “low”, “medium” and “high”, a disagreement between neighbours is less serious than one between the extremes. Hallgren (2012) notes that weighted kappa is typically used for categorical data with an ordinal structure, where rating an item high versus low should count against the coders more than rating it high versus medium. Two standard weighting schemes for k ordered categories are:
For three ordered categories, a one-step disagreement earns 0.5 under linear weights and 0.75 under quadratic weights; a two-step disagreement earns 0 under both. Quadratic weights are therefore more forgiving of small disagreements and relatively harsher on large ones. With quadratic weights, weighted kappa is similar to an intraclass correlation (Revelle, 2024); Hallgren (2012) reports that it is identical to one form of it (the two-way mixed, single-measures, consistency intraclass correlation). With only two categories, both schemes reduce to unweighted kappa, because the weights can only be 1 and 0.
Use linear or quadratic weights only when the order is real. The weights in Cohen’s example are different in kind: they do not follow positions on a scale (confusing categories 1 and 3 costs less than confusing 2 and 3), so they express a view of which confusions matter more.
How to interpret kappa
Landis and Koch (1977) suggested verbal labels for ranges of kappa. As summarised by Hallgren (2012), they are:
- 0.0 to 0.20: slight agreement
- 0.21 to 0.40: fair
- 0.41 to 0.60: moderate
- 0.61 to 0.80: substantial
- 0.81 to 1.0: almost perfect or perfect
By these labels the example’s κ = 0.492 is "moderate" and its κw = 0.348 is "fair". The labels are conventions, not tests, and they are contested. Hallgren (2012) notes that their use “is debated”, and McHugh (2012), who attributes the same bands to Cohen, argues that they may be too lenient for health-related studies because they imply that a score as low as 0.41 might be acceptable. Two further cautions matter more than the choice of labels.
Kappa depends on how common each category is. Here are two invented tables of 100 items. In both, the coders agree on 90.0% of items. In the first, each category is used for half of the items; in the second, the first category is used for 90.0% of them.
| Table | Observed agreement | Chance agreement | Kappa | Label |
|---|---|---|---|---|
| Balanced categories | 90.0% | 50.0% | 0.80 | substantial |
| One dominant category | 90.0% | 82.0% | 0.44 | moderate |
Observed agreement is identical in both tables, yet kappa drops by a whole label, because chance agreement is far higher when one category dominates. For 2 × 2 tables, Feinstein and Cicchetti (1990) describe this as the first of two kappa paradoxes: high observed agreement can come with a drastically lower kappa when the marginal totals are substantially imbalanced. In their second paradox, kappa is higher when the imbalance in the marginal totals is asymmetrical rather than symmetrical. Hallgren (2012) describes two related effects: the prevalence problem, when ratings fall into one category much more often than another, which typically makes kappa unrepresentatively low, and the bias problem, when the two coders’ marginal distributions differ substantially, which typically makes it unrepresentatively high.
Kappa is an estimate. Even with 200 items, the worked example’s interval runs from 0.392 ("fair") to 0.591 ("moderate"). McHugh (2012) warns that an interval can be wide enough to include anything from good to poor agreement, so a single label can hide a lot of uncertainty.
Hallgren (2012) suggests examining each coder’s marginal distribution for prevalence and bias problems. Reporting kappa alongside the agreement table (or at least each coder’s category totals) and percentage agreement lets readers do the same.
The standard error and confidence interval
Our calculator reports the large-sample variance that the R psych package attributes to Fleiss, Cohen and Everitt (1969); the psych documentation notes that these authors corrected the formulae of Cohen (1968) and others (Revelle, 2024). The formula below is the one our calculator uses, and it reproduces the psych package’s standard errors for the worked example. Define the weighted row and column averages w̄ᵢ. = Σⱼ p₊ⱼ wᵢⱼ and w̄.ⱼ = Σᵢ pᵢ₊ wᵢⱼ. Then
For unweighted kappa, use the 0/1 weights. The standard error is the square root, and the approximate 95% interval is κ ± 1.96 × SE. The formula is a large-sample approximation. McHugh (2012) points out that the standard error shrinks as the number of items grows and suggests, as a rough heuristic, no fewer than 30 items. The psych documentation adds that this approximation can produce intervals extending past ±1, and that bootstrap resampling shows the values are not symmetric (Revelle, 2024). With small samples, a bootstrap interval that resamples coded items is a useful check.
How to report Cohen’s kappa
Hallgren (2012) stresses naming both the statistic and the variant you computed. For the worked example:
Two raters classified 200 items into three categories. They agreed on 70.0% of items, against 41.0% expected by chance (Cohen’s kappa = 0.492, 95% CI 0.392 to 0.591; large-sample standard error of Fleiss, Cohen and Everitt, 1969).
Include:
- the number of items and coders, and how the items were sampled;
- percentage agreement and kappa, or the full agreement table if space allows;
- unweighted or weighted kappa and, if weighted, which weights (linear, quadratic or custom);
- the confidence interval and how it was computed;
- a verbal label only as a convenience, with the source of the labels.
Common mistakes
Reporting percentage agreement alone. It ignores chance, so it overstates agreement, most of all when one code is common (Hallgren, 2012; McHugh, 2012).
Reading the labels as pass marks. A kappa just below a cut-off is not meaningfully worse than one just above it. Look at the interval, and judge the value against what your study needs.
Comparing kappas across studies with different category frequencies. As the prevalence example shows, the same coding quality gives a lower kappa when one category dominates. Compare tables, not just coefficients.
Weighting nominal categories, or not naming the weights. Linear and quadratic weights assume an order and give different values from the same table. If the categories have no order, use unweighted kappa or justify any custom weights you use.
Testing whether kappa differs from zero. Trained coders are expected to beat chance, so a significance test against zero says little; Hallgren (2012) notes that such tests are usually not reported. The confidence interval is more informative.
Using Cohen’s kappa for more than two coders or with missing codes. Cohen’s kappa is for exactly two coders who each code every item (Hallgren, 2012). Krippendorff’s alpha is an alternative that, as Hallgren (2012) notes, is more flexible with missing observations; our Krippendorff’s alpha calculator accepts any number of coders and missing codes.
Building the table from totals. Kappa needs the cross-tabulation of the same items by both coders. Two lists of how often each coder used each code are not enough, because they say nothing about which items matched.
Where to go next
The qualitative research hub covers coding and intercoder reliability more broadly. Our guide to Krippendorff’s alpha explains the coefficient that generalises agreement to any number of coders, missing data and different levels of measurement. To check the interval for a small sample, see what bootstrapping is and how resampling gives a confidence interval without a formula.
References
- Cohen, J. (1960). A Coefficient of Agreement for Nominal Scales. Educational and Psychological Measurement, 20(1), 37–46.
- Cohen, J. (1968). Weighted Kappa: Nominal Scale Agreement Provision for Scaled Disagreement or Partial Credit. Psychological Bulletin, 70(4), 213–220.
- Fleiss, J. L., Cohen, J. & Everitt, B. S. (1969). Large Sample Standard Errors of Kappa and Weighted Kappa. Psychological Bulletin, 72(5), 323–327.
- Landis, J. R. & Koch, G. G. (1977). The Measurement of Observer Agreement for Categorical Data. Biometrics, 33(1), 159–174.
- Feinstein, A. R. & Cicchetti, D. V. (1990). High Agreement but Low Kappa: I. The Problems of Two Paradoxes. Journal of Clinical Epidemiology, 43(6), 543–549.
- Hallgren, K. A. (2012). Computing Inter-Rater Reliability for Observational Data: An Overview and Tutorial. Tutorials in Quantitative Methods for Psychology, 8(1), 23–34.
- McHugh, M. L. (2012). Interrater Reliability: The Kappa Statistic. Biochemia Medica, 22(3), 276–282.
- Revelle, W. (2024). cohen.kappa: Find Cohen's Kappa and Weighted Kappa Coefficients for Correlation of Two Raters (psych package documentation, version 2.4.6.26). The Comprehensive R Archive Network (CRAN).
Try it
- Cohen's kappa calculator: Agreement between two coders beyond chance, with weighted kappa, a 95% interval and the worked formula.
- Krippendorff's alpha calculator: Reliability for any number of coders, missing data and four levels of measurement, plus Fleiss' kappa.