Applications / Teaching and exams
Test item analysis calculator
Paste the answer key and each student's answers to a multiple-choice test. In one step you get the difficulty index, the upper–lower discrimination index, a distractor table and KR-20 reliability — the full item analysis that otherwise takes an evening with a calculator.
Analyse your test
How to use it
- Type the answer key as one string of letters. Any labels work — A to D, A to E, or T and F for true/false tests.
- Paste the students' answers, one student per line, starting with a name or roll number and a comma. If you keep marks in a spreadsheet with one column per question, copy the rows straight in; tab-separated cells are understood.
- Leave the group size at 27% unless your class is very small. With fewer than about 20 students, halves give steadier numbers.
- Press Analyse. Read the verdict column first, then look at the distractor table for the items marked Revise or Reject. Print the report for your department file or download the CSV.
How the numbers are calculated
Score. Each matching answer earns one mark; blanks and wrong answers earn zero. Scores rank the students from highest to lowest; when two students tie, the one listed first ranks higher, so results are repeatable.
Difficulty index (p). The number of students who answered the item correctly divided by the number of students. It runs from 0 (nobody right) to 1 (everybody right). Items between about 0.30 and 0.90 are usually useful; outside that band the item tells you little about who has learned more.
Discrimination index (D). The class is split into an upper group (the top 27% by total score) and a lower group (the bottom 27%). Group size is the class size times 27%, rounded to the nearest whole student. D = (correct in upper group − correct in lower group) ÷ group size. D close to 1 means strong students get the item right and weak students get it wrong. D near zero means the item does not separate them, and a negative D — weak students doing better than strong ones — usually points to a wrong key, a trick question or two defensible answers.
Distractor analysis. For each item the tool counts how many students in the whole class, the upper group and the lower group chose each option. A good distractor is chosen by some students, and by more in the lower group than in the upper group. A distractor that pulls more upper-group students is flagged, because it is probably ambiguous. An option nobody chose is doing no work and can be rewritten.
Verdict. Keep when D ≥ 0.40 and p is between 0.30 and 0.90; Keep with minor revision when D ≥ 0.20; Revise when D is below 0.20; Reject or re-key when D is negative.
KR-20. Kuder–Richardson formula 20 estimates how consistently the whole test measures one thing: KR-20 = k/(k−1) × (1 − Σpq ÷ variance), where k is the number of items, q = 1 − p, and the variance is of the total scores (dividing by the number of students). Classroom tests often land between 0.50 and 0.80; short tests are naturally lower.
Worked example
A five-question quiz with key BDACB taken by ten students. Their scores are 5, 4, 4, 4, 3, 3, 3, 2, 2 and 1, so the mean is 3.10 and the standard deviation is 1.14. With 27% groups, 10 × 0.27 = 2.7, which rounds to 3 students per group: Arun, Banu and Cheran on top; Hari, Indu and Jaya at the bottom.
- Item 1 (key B): 7 of 10 correct, so p = 0.70. All 3 upper students and 1 lower student got it right, so D = (3 − 1) ÷ 3 = 0.67. Verdict: Keep.
- Item 3 (key A): p = 0.50, D = (2 − 0) ÷ 3 = 0.67, but option C was chosen by one upper-group student and no lower-group student, so the tool flags C as a distractor worth rereading.
- Item 5 (key B): p = 0.60, but 2 upper and 2 lower students were correct, so D = 0.00. Verdict: Revise — it does not tell strong and weak students apart.
Σpq for the five items is 0.21 + 0.24 + 0.25 + 0.21 + 0.24 = 1.15 and the score variance is 1.29, so KR-20 = 5/4 × (1 − 1.15 ÷ 1.29) = 0.14. That is low, as expected for only five questions.
Press Load example to see these exact numbers in the tool.
Limits and things to check
- Only one-mark objective items are handled. Negative marking, partial credit and essay questions are not included in the score.
- Each item has one correct answer. If you accept two answers after a review, correct the students' lines or the key first.
- With fewer than about 20 students, p and D jump around a lot from one class to the next. Treat the verdicts as prompts to reread a question, not final judgements.
- The verdict thresholds are common rules of thumb from classroom assessment practice; your board or university may use slightly different cut-offs.
Privacy
Student names and answers are processed only in your browser. Nothing is uploaded or stored, and the page makes no network requests. You can use roll numbers instead of names if you prefer.
Frequently asked questions
What is the difficulty index of a test item?
The difficulty index p is the share of all students who answered the item correctly. 7 correct out of 10 gives p = 0.70. A higher p means an easier item.
How is the discrimination index calculated?
Rank students by total score, take the top 27% as the upper group and the bottom 27% as the lower group, then D = (upper correct − lower correct) ÷ group size.
What is a good discrimination index?
A common rule of thumb is D of 0.40 or more is very good, 0.30 to 0.39 good, 0.20 to 0.29 acceptable but worth revising, below 0.20 poor, and a negative D usually means a wrong key or a misleading question.
Are my students' answers uploaded?
No. All calculations happen in your browser and nothing is sent anywhere.