How this tool computes its result
In Simple mode, commission is a flat baseCommission = revenue × baseRate / 100. In Tiered mode, calculateCommission walks the tiers array in order, and for each tier consumes `min(remainingRevenue, tierMax - tierMin + 1)` of the remaining revenue at that tier's rate — the "+1" treats each tier as an inclusive band, which is only mathematically correct if tiers are contiguous with each tier's min set to the previous tier's max + 1. A bonus is added only when revenue ≥ quota: bonus = (revenue − quota) × bonusRate / 100, further gated by bonusThreshold (quota-achievement percent required) when both bonusRate and bonusThreshold are set. effectiveRate = totalCommission / revenue × 100.
