Formula
Lead slots to allocate = Monthly lead volume × Maximum buyers per lead. Total buyer demand = sum of monthly caps.
Allocation runs in passes. In each pass, every buyer still below its cap receives min(cap − already allocated, floor(remaining slots × weight ÷ sum of open buyers' weights)). The pass repeats, with the remaining slots, until the slots run out, no buyer is below cap, or 20 passes have run; if a pass allocates nothing because of rounding, each open buyer receives one slot in turn.
Revenue = sum over buyers of allocated leads × price per lead. Fill = allocated ÷ cap for each buyer. Unmet demand = max(0, total caps − total allocated). Average price realized = Revenue ÷ total allocated.
Buyer lines are entered as: name, cap, weight, price. Weight is relative: a weight of 3 against weights of 2, 2 and 1 claims 3 ÷ 8 of each pass.
Worked examples
Example 1: 1,500 exclusive leads across four buyers (tool defaults)
Buyers: A cap 600, weight 3, $65; B cap 400, weight 2, $55; C cap 300, weight 2, $50; D cap 500, weight 1, $40. Slots: 1,500 × 1 = 1,500. Pass 1, all four open, weights sum to 8: A gets min(600, floor(1,500 × 3 ÷ 8) = 562) = 562; B gets min(400, floor(375)) = 375; C gets min(300, 375) = 300, hitting its cap; D gets min(500, floor(187.5)) = 187. Allocated 1,424; remaining 76. Pass 2, A, B and D open, weights 6: A gets min(38, floor(76 × 3 ÷ 6) = 38) = 38, reaching 600; B gets min(25, floor(25.3)) = 25, reaching 400; D gets min(313, floor(12.7)) = 12, now 199. Allocated 75; remaining 1. Pass 3, only D open: D gets 1, now 200. Final: A 600, B 400, C 300, D 200; 1,500 of 1,500 slots. Revenue: 600 × $65 + 400 × $55 + 300 × $50 + 200 × $40 = $39,000 + $22,000 + $15,000 + $8,000 = $84,000. Demand 1,800; unmet 300, all of it D's. Average price: $84,000 ÷ 1,500 = $56.00. Fill: A, B, C 100%; D 40%.
Example 2: the same buyers with each lead sold to two
Set maximum buyers per lead to 2. Slots: 1,500 × 2 = 3,000. Pass 1, weights 8: A gets min(600, floor(3,000 × 3 ÷ 8) = 1,125) = 600; B min(400, 750) = 400; C min(300, 750) = 300; D min(500, floor(375)) = 375. Allocated 1,675; remaining 1,325. Pass 2, only D open: D gets min(125, 1,325) = 125, reaching 500. Allocated 125; remaining 1,200. Pass 3: no buyer below cap, so the loop stops. Final: 1,800 of 3,000 slots allocated; every buyer at 100% fill; unmet demand 0. Revenue: $39,000 + $22,000 + $15,000 + $20,000 = $96,000. Average price: $96,000 ÷ 1,800 = $53.33. Revenue rose by $12,000 because D was filled, but 1,200 slots went unsold, and the prices entered were exclusive prices; a lead sold to two buyers would normally be priced lower, so re-run with shared prices from the lead pricing calculator before relying on the $96,000.
Example 3: a short month of 800 leads
Volume 800, one buyer per lead, same buyer lines. Pass 1, weights 8: A gets min(600, floor(800 × 3 ÷ 8) = 300) = 300; B min(400, 200) = 200; C min(300, 200) = 200; D min(500, 100) = 100. Allocated 800; remaining 0, so the loop ends after one pass. Revenue: 300 × $65 + 200 × $55 + 200 × $50 + 100 × $40 = $19,500 + $11,000 + $10,000 + $4,000 = $44,500. Demand 1,800; unmet 1,000. Average price: $44,500 ÷ 800 = $55.63. Fill: A 50%, B 50%, C 67%, D 20%. When volume is short, weights decide everything and caps never bind: A's weight of 3 claims 37.5% of every lead, and the cheapest buyer, D, is starved. If D's contract has a minimum, the weights must change.