Formula: Cohen’s Kappa (κ) Systems Engineering Formula
- bothPositiveA: Both Positive A (items)
- rater1PosRater2NegB: Rater1 Pos Rater2 Neg B (items)
- rater1NegRater2PosC: Rater1 Neg Rater2 Pos C (items)
- bothNegativeD: Both Negative D (items)
Measure inter-annotator labeling reliability corrected for chance agreement.
Because kappa removes the agreement you would expect by luck. On the default table the raters agree on 91% of items, but given how often each uses each label, they would agree on about 50.18% by chance. Kappa measures how much of the remaining room they used: 0.4082 out of a possible 0.4982, which gives 0.819. The two figures answer different questions, so report both.
Yes. A negative value means the raters agree less often than chance would predict, which usually signals reversed labels or a misunderstanding of the guidelines. Entering 5, 20, 20 and 5 gives 20% raw agreement against 50% chance agreement and a kappa of minus 0.6, which the page labels Poor (below chance). Check the labelling instructions before anything else.
On the Landis and Koch scale, 0.80 sits at the top of the substantial band and almost perfect starts just above it. A table such as 45, 5, 5 and 45 gives exactly 0.8, and the page labels it Substantial. The default 0.819 clears the line and is labelled Almost Perfect. Quote the number with the band so readers can see how close it is.
With 90, 4, 4 and 2 in the cells, both raters call nearly every item positive, so chance agreement is already 88.72%. Beating that by about three points is a small achievement, and kappa reflects it. This prevalence effect is well known: rare categories make kappa harsh, so report raw agreement next to it.
Not for the coefficient. Swapping the raters exchanges the b and c cells, and both the observed and the chance agreement come out the same, so kappa does not change. What matters is staying consistent: once you decide rater 1 is the row rater, every count of rater 1 positive and rater 2 negative belongs in b. If you later add a second labelling round, keep the same assignment so the tables can be compared.
Enough that a handful of disagreements does not swing the result. On the default 200 items, moving two items from agreement to disagreement shifts kappa by only a couple of hundredths. On a 40-item pilot of 16, 3, 2 and 19, kappa is 0.749, and moving two items the same way drops it to 0.648, a full tenth. The calculator gives no confidence interval, so small samples deserve cautious reading.
It is the agreement two raters would reach if each labelled items at random but kept their own positive rate. Rater 1 calls 47.5% of items positive and rater 2 calls 46.5% positive. Multiply those, multiply the two negative rates, and add: the total is 50.18%. Balanced categories keep this figure near half.
Yes. Treat the model as one rater and the human reference as the other, and fill the four cells from the confusion counts. Kappa then shows how far the model beats a guesser with the same label rates. A model that always predicts the common class can score high accuracy and still get a kappa near zero. Pick a consistent positive class first, so the cells match the model's output.
Kappa is undefined in that case, because chance agreement is 100% and the formula divides by zero, so the page returns an error rather than a number. It means the sample contains no variation for the raters to agree or disagree on. Add items from the other category before measuring agreement. Until then, raw agreement alone is the only honest figure to report.
Only when your categories are ordered and have more than two levels, such as mild, moderate and severe. Weighted kappa gives partial credit when raters are one step apart. This calculator handles a two by two table only, where every disagreement is a full miss, so weighting would make no difference here. For a nominal scale with more than two unordered categories, use plain Cohen's kappa on the larger table.
The default table describes two people who each labelled the same 200 items as positive or negative. They both said positive on 85 items and both said negative on 97. They split on the remaining 18: rater 1 said positive and rater 2 negative on 10, and the reverse happened on 8.
Raw agreement is the share of items on the diagonal: 85 plus 97 agreeing items out of 200, which the page shows as 91%. Kappa then asks how much of that 91% the raters would have reached by luck alone, given how often each of them uses each label. The page puts chance agreement at 50.18%, and the coefficient comes out at 0.82 (0.819 before rounding), which the result labels Landis and Koch: Almost Perfect.
That is a strong result for a binary labelling task. It says the raters closed about four fifths of the gap between chance agreement and perfect agreement. Whether it is good enough depends on what the labels feed into, which is covered further down.
Chance agreement comes from the margins of the table, not the diagonal. Rater 1 said positive on 85 plus 10 items, 95 of 200, a rate of 0.475. Rater 2 said positive on 85 plus 8 items, 93 of 200, a rate of 0.465. If the two raters were labelling independently at those rates, they would both say positive by chance on 0.475 times 0.465 of the items, which is 0.2209.
Do the same for negatives. Rater 1 said negative on 0.525 of items and rater 2 on 0.535, and the product is 0.2809. Add the two products and chance agreement is 0.5018, the 50.18% on the page.
Now the coefficient: observed agreement minus chance agreement, over one minus chance agreement. That is 0.91 minus 0.5018, which is 0.4082, divided by 0.4982. The answer is 0.819. If your hand result differs from the page, check that you built each rater's positive rate from the right pair of cells: rater 1 from a and b, rater 2 from a and c. Mixing those up, for example adding a and d, gives a chance figure with no meaning.
The four inputs follow the usual layout of a two by two agreement table, with rater 1 on the rows and rater 2 on the columns. Cell a is both positive, cell d is both negative, cell b is rater 1 positive with rater 2 negative, and cell c is rater 1 negative with rater 2 positive.
Swapping b and c by mistake does no harm to the coefficient. The chance formula treats the two disagreement cells symmetrically, so raw agreement, chance agreement and kappa all stay the same. The split between the two cells still matters when you are looking for bias. On the default, rater 1 calls positive slightly more often than rater 2, 95 times against 93. If you put all 18 disagreements in the b cell, raw agreement stays at 91% but chance agreement drops to 49.78% and kappa nudges up to 0.821. One rater being consistently more generous shows up in the margins, and a plain percentage would hide it.
Enter counts, not percentages. The calculator adds the four cells to get N, and the table on the page reports that total as 200 items on the default. Proportions such as 0.425 are refused, since the page asks for whole counts.
The verbal label after the coefficient follows the Landis and Koch scale, the bands most papers quote. In that scheme, below 0 is poor agreement, 0 to 0.20 is slight, 0.21 to 0.40 fair, 0.41 to 0.60 moderate, 0.61 to 0.80 substantial and 0.81 to 1.00 almost perfect.
The page prints the band in brackets after the coefficient. A table of 10, 10, 10 and 10 gives 50% raw agreement, 50% chance agreement and a kappa of exactly 0, which lands in the slight band: agreement no better than luck. Two raters who systematically disagree, with 5, 20, 20 and 5, get a kappa of minus 0.6, labelled Poor (below chance). A table of 20, 5, 10 and 15 gives 70% raw agreement and a kappa of 0.4, which is fair.
The default 0.819 sits just inside almost perfect, and the comparison presets return 0.765 (Substantial) and 0.849 (Almost Perfect). A table of 45, 5, 5 and 45 gives exactly 0.8, which the page places at the top of substantial, as the scale intends. The Landis and Koch cut-offs were proposed as a convention, not derived from data, so report the coefficient itself alongside any label, especially when it sits close to a boundary.
One result surprises almost everyone the first time. Put 90 in a, 4 in b, 4 in c and 2 in d. Raw agreement is 92%, higher than the default. Kappa is 0.29.
The reason is in the margins. Both raters call 94 of the 100 items positive, so chance alone would have them agree 88.72% of the time. Beating 88.72% by a few points is not much of an achievement, and kappa says so. The page labels 0.29 as fair agreement on the Landis and Koch scale.
This is a real feature of kappa, not a calculator fault. When one category is rare, a handful of disagreements on the rare items dominates the coefficient. If your task has a rare positive class, such as flagging toxic posts or spotting a rare diagnosis, expect kappa to look harsh even when raw agreement looks excellent. Report both numbers, and look at how the raters handle the rare class specifically before rejecting the labels.
Only the both positive count changes in the page's comparison presets. Drop it from 85 to 51 and N falls to 166, raw agreement to 89.16%, chance agreement rises to 53.83%, and kappa slips to 0.765. Raise it to 128 and N becomes 243, raw agreement 92.59%, chance agreement 50.81%, kappa 0.849.
Kappa improves here because the same 18 disagreements become a smaller share of the total while the two categories stay roughly balanced. If the a cell kept growing, though, the positive category would come to dominate, chance agreement would climb, and eventually kappa would start to fall even with fixed disagreements. More items do not automatically mean a better coefficient.
That makes it worth running your own table at its real size. A pilot of 40 items and a full set of 200 can give quite different values, and small tables are noisy. The calculator gives no confidence interval, so with a pilot sample treat a kappa of 0.7 as a rough sign, not a precise score.
This version handles exactly two raters and two labels. For three or more categories you need a bigger agreement table, and for ordered categories such as a 1 to 5 severity scale a weighted kappa that gives partial credit to near misses is usually more appropriate. For more than two raters, Fleiss' kappa or Krippendorff's alpha are the usual choices.
It also assumes both raters labelled every item. If some items were skipped, drop them from all four cells rather than counting a skip as negative. The same goes for items marked unsure: either give unsure its own category in a bigger table, or exclude those items and say how many you excluded.
Independence matters too. Kappa assumes each rater decided without seeing the other's label. If the second rater reviewed the first rater's work and corrected it, agreement will be inflated and the coefficient will flatter the guidelines. Run the shared sample blind, then compare.
The page checks its inputs. Each cell must be a whole count of zero or more, so negative numbers and proportions are refused. If every item falls in one cell, for example 50 in d and nothing elsewhere, it returns an error instead of a coefficient, because chance agreement is then 100% and kappa is undefined: there is no variation for the raters to agree on.
In annotation work kappa is mostly a gate. Teams label a shared sample, compute kappa, and only scale up once it clears a threshold they agreed in advance. A common pattern is to rewrite the labelling guidelines when kappa is below the substantial band, then relabel a fresh sample.
Look at the off-diagonal cells as well as the coefficient. On the default, the split of 10 against 8 is fairly even, which points to genuinely ambiguous items rather than one rater being stricter. A split like 18 against 0 would point to a calibration problem that a short conversation can often fix.
When kappa is used to compare a model with human labels, the same caution applies. A classifier that always predicts the majority class can match a human on most items and still earn a kappa near zero, which is exactly the point of using it.
Finally, record the table, not just the coefficient. The four counts let a reader recompute raw agreement, chance agreement and kappa, check the bands for themselves, and see whether disagreements lean one way. A single 0.82 in a methods section tells them much less than the 85, 10, 8 and 97 behind it.