When a decision requires harming a small group, or an individual, to save a larger group. Seen in war, but also with corporate lay-offs or any such situation where you're balancing the 'needs of the many against the needs of the few.' Referred to as 'Devil's Math' because there's no good choice. You're doing something evil to a small group to try and prevent greater evil from happening.
Dropping the a-bomb on Japan killed tens of thousand of people, but prevented an invasion that would've killed millions. It was devil's math, but what choice did we have.
It's all devil's math. If we don't fire this guy we won't have enough to cover payroll for the other thirty workers, then it all comes down.