Number of parlays
C(n, k) = n! ÷ (k! × (n − k)!)
Five legs by 2s is 10 parlays; by 3s is also 10; by 4s is 5.
Each parlay's payout
payout = stake × leg₁ decimal × leg₂ decimal × …
What you get back
Add up every parlay whose legs all won. With mixed prices, which legs hit matters, so the calculator checks every possible set of winners and shows the lowest and highest return.