Test Item Analysis Calculator: Difficulty Index, Discrimination Index and KR-20
How do you calculate the difficulty and discrimination index of a test item?
Difficulty p = the number of students who answered the item correctly divided by the number who took it. Discrimination D = pupper - plower: the proportion correct in the top 27% of students by total score minus the proportion correct in the bottom 27%. Ebel's guide: D of .40 or more is very good, .30 to .39 good, .20 to .29 needs revision, below .20 poor.
Teachers still pass around the same old item analysis spreadsheets, and most of them stop at difficulty. This one does the whole job: difficulty, upper-lower discrimination, the corrected point-biserial, every distractor, and KR-20 with what it would be if each item were dropped.
Paste the answer key and each student's answers as letters; the calculator scores them and marks the items to keep, revise or drop.
Built by Muhammad Shahzeb Anwar, MSc Industrial and Organizational Psychology. Item analysis is test-construction method from psychometrics, the same field that builds selection tests at work.
Your test
Runs in your browser. Nothing you type is stored or sent anywhere.
Reading the item table
p (difficulty) is the proportion correct, so a higher p means an easier item. For a four-option multiple-choice test, items between about .30 and .80 discriminate best; items everyone gets right (p above .90) tell you nothing about who knows more.
D (discrimination) compares the top and bottom groups. Kelley (1939) showed that 27% at each end is the best trade-off between group size and contrast. Ebel's guide is the one most teachers use: .40 and above very good; .30 to .39 reasonably good; .20 to .29 marginal, usually needs revising; below .20 poor, rewrite or drop. A negative D means weaker students did better than stronger ones, which almost always means a wrong key or an ambiguous question.
r pbis is the correlation between the item (0/1) and the total score on the other items. It uses every student, not just the top and bottom groups, so it is steadier with small classes. Values above .20 are usually acceptable.
Distractor analysis
For each item the table shows how many students chose each option, with the upper and lower group counts in brackets. A good distractor is chosen by some students, more of them in the lower group. Three warning signs: a distractor nobody chose (it is not doing any work, so the item is really a three-option item); a distractor that attracts more of the top group than the bottom (check whether it could be argued to be right); and a key chosen more by the bottom group (check the key first).
KR-20, and why two textbooks give different answers
KR-20 = k/(k - 1) x (1 - sum of pq / variance of total scores), where k is the number of items, p the proportion correct on each item and q = 1 - p. It is Cronbach's alpha for items scored 0 or 1. For a classroom test .70 is acceptable and .80 good; for a high-stakes decision about one student, .90 or more is usually expected.
Worked check: in a widely used university module, 10 students answer 6 items, the sum of pq is 1.35 and the total scores have a sum of squares of 40.9. Dividing that by n - 1 gives a variance of 4.544 and KR-20 = 1.2 x (1 - 1.35/4.544) = 0.84. Dividing by n, as Kuder and Richardson did and as SPSS and R effectively do, gives 4.09 and KR-20 = 0.80. Both numbers appear in textbooks; the calculator reports the second and shows the first underneath so your answer matches your course.
What this will not tell you
This analyses one test with one correct answer per item. It does not handle partial credit or essay marks (use Cronbach's alpha), item response theory, or very small groups: with fewer than about 20 students D and r pbis move a lot from one class to the next, so treat flags as reasons to look at an item, not verdicts. Nothing you paste leaves your browser.
Questions people actually ask
What is a good difficulty index?
For a four-option multiple-choice item, roughly .30 to .80. Items above .90 or below .20 tell you little about differences between students, though a few easy items at the start of a test are fine.
What is a good discrimination index?
Ebel's guide: .40 and above very good, .30 to .39 reasonably good, .20 to .29 marginal, below .20 poor. A negative discrimination index means the item should be checked for a wrong key.
Why use the top and bottom 27%?
Kelley (1939) showed that 27% at each end gives the best balance between having enough students in each group and having groups that differ clearly. With small classes, top and bottom halves are also used.
What is KR-20?
The Kuder-Richardson Formula 20, a reliability coefficient for tests whose items are scored right or wrong. It equals Cronbach's alpha computed on 0/1 scores.
What is the difference between KR-20 and KR-21?
KR-21 assumes every item has the same difficulty and needs only the mean, variance and number of items. When items differ in difficulty it underestimates reliability, so KR-20 is preferred when you have item data.
What is a distractor analysis?
A count of how many students chose each wrong option, usually split by upper and lower groups. It shows options nobody chose and options that mislead strong students.
Sources
Formulas from Kuder and Richardson (1937) and Kelley (1939); Ebel's discrimination guide as given in Ebel and Frisbie, Essentials of Educational Measurement (5th ed., 1991). The worked example was checked on 2 November 2026.
- Kuder, G. F., & Richardson, M. W. (1937). The theory of the estimation of test reliability. Psychometrika, 2(3), 151-160: https://doi.org/10.1007/BF02288391
- Kelley, T. L. (1939). The selection of upper and lower groups for the validation of test items. Journal of Educational Psychology, 30(1), 17-24: https://doi.org/10.1037/h0057123
- Real Statistics: Kuder-Richardson Formula 20 (worked example and the VAR.P convention): https://real-statistics.com/reliability/internal-consistency-reliability/kuder-richardson-formula-20/
- Florida Gulf Coast University, Module 5: KR-20 worked example (6 items, 10 students): https://ruby.fgcu.edu/courses/chewittg/10009/module5kr20.htm
Cite this tool
Free to use and free to quote. If a figure here is useful in something you are writing, a link back is all that is asked.
Muhammad Shahzeb Anwar, MSc Industrial and Organizational Psychology. Item Analysis Calculator (Difficulty, Discrimination, KR-20). Shahzeb Speaks. https://www.shahzebspeaks.com/item-analysis-calculator/
The other free tools
Each one answers a single question and refuses the ones it cannot. All free, none asks for an email address.
Pakistan employment law6 tools
India3 tools
UK employment law4 tools
United States5 tools
Canada4 tools
EU regulation and hiring law5 tools
I/O psychology and psychometrics13 tools
US money and tax (2026)5 tools
UK money and tax (2026-27)7 tools
Canada money and tax4 tools
Online sellers3 tools
Household planners4 tools
Hiring and selection4 tools
Absence, pay, turnover and engagement4 tools
Reading a number without being fooled by it4 tools
Doing this after every test?
The Test Item Analysis Workbook does the same analysis in Excel or Google Sheets for up to 60 items and 200 students, with a reteach list by item, a printable item report and an offline browser version.