Formula: Item Difficulty & Discrimination Formula
- groupSizeEach27Pct: Group Size Each27 Pct (students/group)
- correctInUpperGroup: Correct In Upper Group (students)
- correctInLowerGroup: Correct In Lower Group (students)
Audit test questions for ideal difficulty (0.3–0.7) and discrimination (D ≥ 0.30).
Taking the extremes makes the difference between strong and weak students easier to see, while keeping enough students in each group to be useful. The 27% split is the convention the page follows. The middle group is left out of both p and D, so the calculation needs only two counts per item. It also means you can do the counting by hand from two short piles of scripts.
Generally yes, as long as it reflects real knowledge. A D of 0.5, as in the default, means the top group was 50 percentage points more accurate than the bottom group. But a test made only of high-D items can feel harsh, and a few easy items with lower D are often included on purpose. What matters most is that no item has a D near zero or below it without a good reason.
Yes. If nearly everyone gets it right, there is no room for a gap. With 29 of 30 correct in the top group and 26 of 30 in the bottom, p is 0.92 and D is just 0.1. The item may still be a good check of essential knowledge; it just does not rank students.
Check the answer key first, because a miskeyed item is the most common cause. Then look for ambiguous wording or a second defensible answer. With 10 correct in the top group and 18 in the bottom, out of 30 each, D is -0.27. An item like that is usually worth fixing or dropping before you reuse it.
Not exactly. It uses only the two extreme groups, so the middle of the class is ignored. With balanced groups the two are usually close, but if you have all responses, the proportion correct across every student is the better measure. Use this page's p as an approximation. The gap tends to be largest when the middle of the class performs very differently from the extremes.
Multiply the number of students who sat the test by 0.27 and round to a whole number. A class of 100 gives 27 per group. Put that number in the group size box, then count how many in each group answered the item correctly. Use the same groups for every item on the test. If the class is small, the groups will be small too, so read the results with care.
In that preset 18 of 30 top students and 15 of 30 bottom students answer correctly. Difficulty is fine at p = 0.55, but the groups are only 10 percentage points apart, so D is 0.1 and the page rates it poor. Students who did well overall were barely more likely to get it right, which often means the item tests something other than the course content.
Each correct count must be between 0 and the group size, and the group size must be a whole number of at least one. Entering 40 correct in a group of 30, or lowering the group size to 18 while keeping 26 correct, returns an error naming the limit. Recount the scripts in each group rather than editing the numbers to clear the message.
Not directly. The formula assumes each answer is simply right or wrong. For items scored in points, you would need to compare the average score of the two groups as a share of the maximum. You could treat full marks as correct, but that throws information away and changes the meaning of p.
More is better, and very small groups give jumpy figures. With 8 students per group, one answer changing moves D by 0.125, which is wider than any of the bands on the verdict line. Results from small classes are best used to flag items for review rather than to reject them outright.
No. The poor band, below 0.20, flags items to look at. An easy item such as 29 versus 26 correct out of 30 falls there with D = 0.1, yet may still be a useful check of basic knowledge. A marginal item at D = 0.27 with p of 0.27 is hard rather than flawed. Read the item and its wrong options before deciding. Items with negative D are the most urgent to review.
Because D only measures the gap between the groups. If 15 of 30 top students and 15 of 30 bottom students answer correctly, both groups are at 50%, so D is 0 and p is 0.5. The item sits at an ideal difficulty but tells you nothing about who knows the material. That pattern often points to guessing or an unclear question.
Item analysis asks two plain questions about a single test question. How many students got it right? And did the students who did well on the whole test get it right more often than the students who did badly? The first answer is the difficulty index, p. The second is the discrimination index, D.
The default describes one item on a test where each extreme group holds 30 students. In the top group, 26 answered correctly. In the bottom group, 11 did. The calculator turns that into an upper group accuracy of 86.67% and a lower group accuracy of 36.67%.
D is the gap between those two proportions: 0.8667 minus 0.3667, which is 0.5. The page labels this very good, the top of its five bands, because it is 0.40 or more. The difficulty p is the share correct across both groups: 37 correct answers out of 60, or about 0.62. That sits inside the 0.3 to 0.7 band the page treats as ideal.
So the default item is doing what a good question should. It is neither a giveaway nor a trick, and it separates stronger students from weaker ones by a wide margin.
The method behind the calculator, associated with Kelley, does not use every student. It ranks the class by total test score, takes the top 27% and the bottom 27%, and sets the middle aside. The group size input is the number of students in each of those two groups.
For a class of 100, each group holds 27 students. If 22 of the top group and 9 of the bottom group answer an item correctly, the calculator gives D = 0.48 and p = 0.57, with upper accuracy of 81.48% and lower accuracy of 33.33%. For a smaller class you round 27% to the nearest whole student.
Both groups must be the same size for the formula to work, because it divides each count by the same N. If ties in total score make the cut-off messy, decide on a rule, such as including or excluding all tied students, and apply it the same way for every item on the test.
Use the same two groups for every question. The groups come from the total score, not from the item you are studying, so you sort the class once and then count correct answers on each question within those fixed groups.
Despite its name, p is an easiness index. A higher p means more students answered correctly. A p of 0.92 is an easy item; a p of 0.27 is a hard one.
In this calculator p is computed from the two extreme groups only: correct answers in both groups, divided by twice the group size. That is a common shortcut, and with balanced groups it is usually close to the whole-class figure. It is not the same thing, though. The middle 46% of the class does not count. If you have every student's response, the simple proportion correct across the whole class is the more direct measure of difficulty.
The page treats 0.3 to 0.7 as the ideal range. Items in that band leave room for the top group to do well and the bottom group to do badly. Items near 0 or 1 cannot discriminate much, whatever their quality, because almost everyone is on the same side.
That last point is arithmetic, not opinion. If all 30 students in both groups get an item right, p is 1 and D is 0. There is simply no gap left to measure.
D can run from -1 to +1. A value of +1 would mean every top student was right and every bottom student wrong. Zero means both groups did equally well. A negative value means the weaker students did better than the stronger ones.
Easy items squash D. With 29 correct in the top group and 26 in the bottom, both out of 30, p is 0.92 and D is only 0.1. The question may be perfectly sound. It is just one almost everyone knows, so it does little to separate students. That can be acceptable for a warm-up item or a check of essential knowledge.
Hard items squash it from the other side. With 12 correct in the top group and 4 in the bottom, p is 0.27 and D is 0.27. Even the strong students mostly missed it, so the gap between groups cannot grow very large. The page calls this marginal, 0.20 to 0.29, and suggests reviewing the item.
The verdict line sorts D into five bands. At 0.40 or more an item is very good. From 0.30 to 0.39 it is good. From 0.20 to 0.29 it is marginal and worth a review. Below 0.20 it is poor, and the page suggests revising or dropping it. Any negative value gets its own message: the lower group did better, so check the answer key. The easy item above, at D = 0.1, lands in the poor band even though the question itself may be fine, which is why the band should start a review rather than end one.
Suppose 10 students in the top group answer correctly and 18 in the bottom group do. The calculator gives D = -0.27 and p = 0.47, with upper accuracy of 33.33% and lower accuracy of 60%. The weaker students did much better on this item than the stronger ones.
The first thing to check is the answer key. A miskeyed item, where the marked correct option is actually wrong, very often produces a negative D. Strong students choose the truly correct answer and are marked wrong, while weaker students land on the keyed option by chance or by a shallow reading.
If the key is right, look at the wording. A question with two defensible answers, a trap that rewards overthinking, or a phrase that strong students read differently can all push D below zero. Looking at which wrong option the top group chose usually shows the problem quickly.
An item with negative D is worth fixing or removing before you reuse the test, and you may want to reconsider how it was scored this time.
Every number on this page is a proportion of a fairly small count. With 30 students per group, one extra correct answer in the top group raises upper accuracy by about 3.3 percentage points and D by about 0.03. With 8 students per group, one answer moves D by 0.125.
Try the small case. With 8 students in each group, 7 correct in the top and 3 in the bottom, D is 0.5 and p is 0.63. That looks like the default, but it rests on ten correct answers in total. Two students changing their minds would move it a long way.
Treat results from small groups as a prompt to look at the item, not a verdict. If you give the same test to several classes, combine the counts across classes before calculating, keeping the 27% groups defined within each class or within the combined set, but not a mix of both.
Also expect the borderline cases to wobble. An item at D = 0.23, from 20 correct in the top group and 13 in the bottom, is labelled marginal. Two more correct answers in the top group would lift it into the good band, and two fewer would drop it to poor. Look at the item before rewriting it.
The two correct-answer inputs are counts of students, not percentages, and each must be no larger than the group size. The calculator enforces this. Enter 40 correct in a group of 30 and it returns an error saying the count must be between 0 and the group size, rather than a result.
The same check runs when you shrink the group size without changing the counts. With 18 students per group and the default 26 correct in the top group, you get the same error, this time naming 18 as the limit. Group size itself must be a whole number of at least one; a value such as 2.5 is rejected. If you see one of these messages, recount from the scripts rather than adjusting numbers until the error goes away.
Another common slip is entering the whole class size as the group size. If about a hundred and ten students sat the test, the group size is about 30, not the full class. Entering the class size makes both accuracies look far too low and shrinks D.
Finally, count correct answers for the item you are studying only. Using the students' total scores here will not give a meaningful result.
After a test, run each item through the calculator and sort the results into a few groups. Items with p in the 0.3 to 0.7 band and D of 0.30 or more, like the default, can stay as they are.
Items with D below 0.30 deserve a look, but not all of them need rewriting. A very easy item with low D may be doing a fine job of checking basic knowledge. A hard item with low D may cover material that was not taught well, which is a teaching question rather than a test question. Any item with D near zero or below zero, at moderate difficulty, is the one most likely to be badly written.
For multiple choice, also check how each wrong option performed. A distractor that nobody chose is not working, and one that attracts many of the top group may be arguably correct. The calculator does not do this distractor analysis, but it tells you which items to open first.
Keep the results with the test. When you reuse it, the items with a record of good p and D values give you a reliable core to build around.