Inter Rater Reliability How to Calculate

.irr-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 800px; margin: 20px auto; padding: 25px; border: 1px solid #e0e0e0; border-radius: 12px; background-color: #ffffff; box-shadow: 0 4px 6px rgba(0,0,0,0.05); } .irr-header { text-align: center; margin-bottom: 30px; } .irr-header h2 { color: #2c3e50; margin-bottom: 10px; } .irr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; } .input-group { margin-bottom: 15px; } .input-group label { display: block; font-weight: 600; margin-bottom: 8px; color: #34495e; font-size: 14px; } .input-group input { width: 100%; padding: 12px; border: 1px solid #ccd1d9; border-radius: 6px; font-size: 16px; box-sizing: border-box; } .irr-button { width: 100%; background-color: #3498db; color: white; padding: 15px; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background-color 0.3s; } .irr-button:hover { background-color: #2980b9; } .irr-result { margin-top: 30px; padding: 20px; border-radius: 8px; background-color: #f8f9fa; display: none; } .result-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eee; } .result-item:last-child { border-bottom: none; } .result-label { font-weight: 600; color: #2c3e50; } .result-value { font-weight: bold; color: #2980b9; } .irr-article { margin-top: 40px; line-height: 1.6; color: #444; } .irr-article h3 { color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 5px; margin-top: 25px; } .interpretation-box { background-color: #e8f4fd; padding: 15px; border-left: 5px solid #3498db; margin: 20px 0; } table.irr-table { width: 100%; border-collapse: collapse; margin: 20px 0; } table.irr-table th, table.irr-table td { border: 1px solid #ddd; padding: 12px; text-align: center; } table.irr-table th { background-color: #f2f2f2; }

Inter-Rater Reliability Calculator

Calculate Cohen's Kappa (κ) for binary categorical data between two raters.

Total Observations: 0
Observed Agreement (Po): 0%
Expected Agreement (Pe): 0%
Cohen's Kappa (κ): 0.00
Strength of Agreement:

What is Inter-Rater Reliability?

Inter-rater reliability (IRR) is a statistical measure that quantifies the degree of agreement between two or more independent coders or observers. In research, simply calculating the percentage of agreement is often insufficient because it does not account for the agreement that occurs purely by chance. This is where Cohen's Kappa becomes essential.

How to Calculate Cohen's Kappa

Cohen's Kappa (κ) is used for categorical data where two raters classify items into mutually exclusive categories. The formula is:

κ = (Po – Pe) / (1 – Pe)

  • Po (Observed Agreement): The proportion of items on which the raters actually agreed.
  • Pe (Expected Agreement): The proportion of agreement expected by random chance based on the marginal totals.

Interpretation of Results

Based on the widely accepted scale by Landis and Koch (1977), here is how to interpret your Kappa score:

Kappa Statistic Strength of Agreement
< 0.00Poor (Less than chance)
0.00 – 0.20Slight Agreement
0.21 – 0.40Fair Agreement
0.41 – 0.60Moderate Agreement
0.61 – 0.80Substantial Agreement
0.81 – 1.00Almost Perfect Agreement

Real-World Example

Imagine two doctors diagnosing 100 patients for a specific condition (Yes/No). If they both agree "Yes" for 40 patients and "No" for 40 patients, but disagree on the remaining 20, their observed agreement is 80%. However, if one doctor says "Yes" 60% of the time and the other says "Yes" 50% of the time, the chance agreement (Pe) would be calculated to see if that 80% is actually impressive or just expected.

function calculateKappa() { var a = parseFloat(document.getElementById('cellA').value) || 0; var b = parseFloat(document.getElementById('cellB').value) || 0; var c = parseFloat(document.getElementById('cellC').value) || 0; var d = parseFloat(document.getElementById('cellD').value) || 0; var total = a + b + c + d; if (total === 0) { alert("Please enter values for the observations."); return; } // Observed Agreement var po = (a + d) / total; // Marginal Totals var rater1Yes = a + b; var rater1No = c + d; var rater2Yes = a + c; var rater2No = b + d; // Expected Agreement (Pe) var pe = ((rater1Yes / total) * (rater2Yes / total)) + ((rater1No / total) * (rater2No / total)); // Kappa Calculation var kappa = 0; if (pe < 1) { kappa = (po – pe) / (1 – pe); } else { kappa = 1; // Perfect agreement logic } // Strength Interpretation var strength = ""; if (kappa < 0) strength = "Poor (Less than chance)"; else if (kappa <= 0.20) strength = "Slight Agreement"; else if (kappa <= 0.40) strength = "Fair Agreement"; else if (kappa <= 0.60) strength = "Moderate Agreement"; else if (kappa <= 0.80) strength = "Substantial Agreement"; else strength = "Almost Perfect Agreement"; // Display Results document.getElementById('resTotal').innerText = total; document.getElementById('resPo').innerText = (po * 100).toFixed(2) + "%"; document.getElementById('resPe').innerText = (pe * 100).toFixed(2) + "%"; document.getElementById('resKappa').innerText = kappa.toFixed(4); document.getElementById('resStrength').innerText = strength; document.getElementById('irrResult').style.display = 'block'; }

Leave a Comment