Surplus and Shortage Calculator
Solve the classic surplus and shortage word problem: from giving a items each with X left over and b items each falling Y short, find the number of people and the total.
Input
From the surplus and shortage left when the amount handed out changes, find the number of people and the total.
First case (some are left over)
Second case (some fall short)
Enter b greater than a. The surplus and shortage must be zero or more.
Result
Number of people
4 people
Total items
21 items
Step-by-step solution
Find the per-person difference: b minus a equals 6 minus 4 equals 2 items.
Add the surplus and shortage: X plus Y equals 5 plus 3 equals 8 items.
Find the people: (X plus Y) divided by (b minus a) equals 8 divided by 2 equals 4 people.
Find the total: a times people plus X equals 4 times 4 plus 5 equals 21 items.
Check a times people plus X
21 items
Check b times people minus Y
21 items
Both totals match, so the answer is correct.
How it works
- When the items per person rise from a to b, the total needed rises by the per-person difference (b minus a) times the number of people.
- That increase equals the surplus X disappearing plus the new shortage Y appearing, so the number of people equals (X plus Y) divided by (b minus a).
- The total can be found two ways, a times people plus X, or b times people minus Y, and both must match, which serves as the check.
- For a whole number of people, b must be greater than a and (X plus Y) must divide evenly by (b minus a).
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Surplus and Shortage Calculator