Weighted Kappa Calculator

Agreement statistics

Weighted kappa0.788
Unweighted kappa0.669
Observed agreement78.3 %
Weighted disagreement (observed / expected)0.067 / 0.314
How this was calculated
  1. The 3x3 table holds 60 ratings; row totals 24, 21, 15 and column totals 24, 21, 15.
  2. With quadratic weights, the observed weighted disagreement is 0.067 and the chance weighted disagreement is 0.314.
  3. Weighted kappa: 1 - 0.067 / 0.314 = 0.788.
  4. For comparison, unweighted kappa from 78.3 % observed agreement is 0.669; the quadratic weighted kappa is 0.788.

When two raters grade on an ordered scale - mild, moderate, severe; fail, pass, distinction - a plain kappa treats every disagreement as equally bad. That wastes the structure of the scale: confusing mild with moderate is a venial sin, confusing mild with severe is a mortal one. Weighted kappa restores the distinction, charging each cell of the table by how far apart its two ratings sit.

Enter the nine counts of a 3x3 agreement table, choose linear or quadratic weights, and the calculator returns the weighted kappa, the unweighted kappa for comparison, the observed agreement, and the observed-versus-expected weighted disagreement. Cohen's kappa page on this site handles the two-rater yes/no case; this page is its ordinal sibling.

Worked examples

Quadratic weights, 0.788

(20 · 3 · 1 · 4 · 15 · 2 · 0 · 3 · 12 · Quadratic weights)

Weighted kappa0.788
Unweighted kappa0.669
Observed agreement78.3 %
Weighted disagreement (observed / expected)0.067 / 0.314

Linear weights, 0.753

(30 · 5 · 0 · 6 · 25 · 4 · 0 · 5 · 20 · Linear weights)

Weighted kappa0.753
Unweighted kappa0.680
Observed agreement78.9 %
Weighted disagreement (observed / expected)0.105 / 0.425

Diffuse table, 0.270

(10 · 8 · 6 · 7 · 9 · 5 · 5 · 6 · 14 · Quadratic weights)

Weighted kappa0.270
Unweighted kappa0.206
Observed agreement47.1 %
Weighted disagreement (observed / expected)0.250 / 0.343

Why ordinal ratings need weights

The formula is kappa_w = 1 - (observed weighted disagreement)/(chance weighted disagreement). Diagonal cells weigh zero; off-diagonal cells weigh by distance. Linear weights charge a two-step miss twice a one-step miss; quadratic weights charge it four times, which punishes gross misclassification the way clinical and educational practice actually feels it.

On the default table - 60 ratings concentrated on the diagonal - quadratic weights give 0.788 against the unweighted 0.669. The gap between the two numbers is itself diagnostic: most disagreements are one-step near misses, which the weighted statistic forgives and the unweighted one does not.

Quadratic weighted kappa has a famous second identity: it is numerically very close to the intraclass correlation of the same ratings, which is why medical literature reports them almost interchangeably. The intraclass correlation page on this site approaches the same data through ANOVA instead.

  • kappa_w = 1 - observed weighted disagreement / chance weighted disagreement
  • Linear weights: charge = distance / (k - 1)
  • Quadratic weights: charge = distance squared / (k - 1) squared
  • Quadratic weighted kappa approximates the ICC

Worked examples: three 3x3 tables

The default table (20, 3, 1 / 4, 15, 2 / 0, 3, 12) has 78.3 % raw agreement. Its observed weighted disagreement is 0.067 against a chance level of 0.314, giving the quadratic weighted kappa of 0.788. Only one rating in sixty is a two-step miss, and the weights notice.

The second table (30, 5, 0 / 6, 25, 4 / 0, 5, 20) under linear weights gives 0.753, with unweighted kappa 0.680. Its disagreements are also mostly adjacent - the two corner cells are empty - so linear and unweighted figures stay within a tenth of each other.

The third table spreads counts everywhere (10, 8, 6 / 7, 9, 5 / 5, 6, 14): raw agreement only 47.1 %, weighted disagreement 0.250 against 0.343 expected, and quadratic weighted kappa collapses to 0.270. Weights cannot rescue a table whose mass is genuinely off the diagonal.

The weighted disagreement pairs, exactly as the calculator prints them: 0.067 / 0.314 for the quadratic first example, 0.105 / 0.425 for the linear second example (whose observed agreement is 78.9 %), and 0.250 / 0.343 for the third example, whose unweighted kappa is 0.206.

Linear versus quadratic weights

The choice is a statement about consequences, and it should be made before the data are seen. Linear weights suit scales where each step is meant to be equal - a five-point satisfaction item. Quadratic weights suit scales where the extremes are clinically or commercially different in kind, and they are the default in most medical agreement studies.

The same table can straddle a benchmark boundary depending on the choice, which is why reporting standards ask for the weighting scheme to be named alongside the number. A weighted kappa quoted without its weights is half a result.

This page computes one scheme at a time so the two can be compared honestly; on the default table the linear figure would sit between the unweighted 0.669 and the quadratic 0.788, exactly where intuition puts it.

Reporting rule: always name the weighting scheme. 'Weighted kappa 0.788 (quadratic)' is a result; 'weighted kappa 0.788' is an advertisement.

Weighted versus unweighted kappa

Unweighted kappa - including the yes/no Cohen's kappa on its own page - counts every off-diagonal cell as a full disagreement. For nominal categories (blood type, diagnosis codes with no ordering) that is correct, because there is no 'near'. The moment categories order, the unweighted statistic systematically understates agreement quality.

The size of the understatement measures the near-miss share: when weighted and unweighted kappas nearly agree, disagreements are mostly gross; when they diverge as in the first example (0.788 against 0.669), the raters are arguing about boundaries, not about substance - a training problem, not a competence problem.

Neither statistic fixes a biased rater. If one rater's marginal totals are wildly different from the other's, the chance correction absorbs some of it, but a systematic threshold difference shows up as asymmetric off-diagonal counts, visible in the table long before it shows in any single number.

Reading the table before the statistic

The nine counts repay a direct look. Diagonal mass is agreement; the corners (1,3) and (3,1) are the catastrophic cells; asymmetry across the diagonal reveals which rater grades harder. In the default table the (2,1) cell holds 4 against (1,2)'s 3 - nearly symmetric, so no strong severity bias.

Marginal totals drive the chance term: raters who both pile ratings into one category inflate chance agreement and deflate kappa, the well-known prevalence paradox. The third example's diffuse margins are part of why its kappa is low despite no catastrophic corner counts.

Sample size discipline applies as elsewhere: 60 ratings give a serviceable estimate, 20 give an anecdote. The statistic is exact arithmetic on the table; the uncertainty is in the sampling, and confidence intervals for weighted kappa are the honest companion this page leaves to the study report.

Benchmarks and their limits

The Landis-Koch bands (0.61-0.80 substantial, above 0.80 almost perfect) are the scale most readers will apply to the examples: the default table's 0.788 sits at the top of 'substantial', the second table's 0.753 beside it, and the diffuse table's 0.270 down in 'fair'. The bands are conventions, not physics, and their originators offered them as rough guides.

Context should overrule the bands routinely: a weighted kappa of 0.788 for grading essays and the same number for triaging chest pain carry different consequences, and the acceptable threshold belongs to the application. Report the number, the weights, and the table - then let the domain judge.

Prevalence bends the bands too: with marginals piled into one category, chance disagreement shrinks and kappa can sag despite excellent raw agreement. The observed agreement printed beside every result on this page is the antidote to misreading that sag.

From 3x3 to larger ordinal tables

Nothing in the method is special to three categories: the weights generalise to distance over (k - 1) for any k, and the sums run over all k squared cells. Five-point scales are the commonest larger case in practice - satisfaction and symptom inventories - and the same linear/quadratic choice governs them.

What changes with k is the interpretation of a one-step miss: on a 3-point scale it is half the possible distance, on a 5-point scale a quarter, and the normalisation by (k - 1) keeps the statistic comparable across the two. The corner cells of a 5x5 table are correspondingly graver errors than those here.

Sparse large tables bring the sampling problem back: a 5x5 table needs several hundred ratings before its off-diagonal cells are populated enough for the weighted sums to stabilise. The 3x3 examples, at 60 to 95 ratings, sit at the comfortable minimum for their size.

Weighted kappa in practice

Medical imaging is the statistic's home ground: two radiologists grading scans on an ordinal severity scale, where the quadratic-weighted figure is routinely reported beside the raw table. The default example's shape - heavy diagonal, thin adjacent cells, nearly empty corners - is exactly what a well-calibrated pair of readers produces, and its 0.788 is a typical publishable value.

Education runs it for essay and performance grading, where the near-miss logic matches how markers actually disagree: adjacent grade boundaries are judgement calls, two-band jumps are errors. Linear weights are commoner there, reflecting mark schemes whose steps are designed to be equal.

In both fields the workflow is the same: build the table, look at the corners and the asymmetry first, then compute - with the weighting scheme chosen and declared in advance. This page mechanises the last step; the first two remain the analyst's craft.

One sentence of method, worth memorising: weighted kappa is unweighted kappa with a conscience - it asks not only whether the raters agreed, but how badly they missed when they did not, and charges accordingly.

Choose the weights before the data arrive, declare them in the report, and the number will survive review.

FAQs

What is the quadratic weighted kappa for the default table?

0.788, against an unweighted kappa of 0.669 on the same counts.

What do linear weights give on the second table?

0.753.

What happens on a diffuse table with many disagreements?

Weighted kappa falls to 0.270 - the off-diagonal mass dominates.

What is the observed agreement in the default table?

78.3 % of ratings sit on the diagonal.

What do quadratic weights charge a two-step miss?

The full disagreement weight, while a one-step miss costs only a quarter of it.

When is weighted kappa required?

Whenever the categories are ordered - the 3x3 examples here - because unweighted kappa cannot see near misses.

Sources

Related calculators

Cohen's Kappa Calculator
Cohen's kappa inter-rater agreement statistic from a two-rater yes/no table, with observed and chance agreement and the Landis and Koch band.
Cronbach's Alpha Calculator
Cronbach's alpha reliability of a test or questionnaire scale from the number of items, the sum of the item variances and the variance of the total score, with the implied mean inter-item correlation.
Spearman-Brown Prophecy Formula Calculator
Predict a test's reliability when its length is changed, by the Spearman-Brown prophecy formula, with the length factor needed to reach a target reliability.