{"skill":{"slug":"afrexai-margin-analysis","displayName":"Margin Analysis & Profit Optimization","summary":"Analyze and optimize margins by product, segment, and channel; detect erosion patterns; assess pricing power; and model scenarios for profit improvement.","description":"# Margin Analysis & Profit Optimization\n\nAnalyze gross, operating, and net margins by product line, customer segment, and channel. Identify margin erosion patterns and build pricing power.\n\n## When to Use\n- Quarterly margin reviews\n- Pricing decisions (new product, discount approval, bundle strategy)\n- Cost structure changes (new vendor, headcount, infrastructure)\n- Board prep or investor reporting\n- Post-acquisition integration (blended margin modeling)\n\n## Framework\n\n### Step 1: Margin Stack (Top → Bottom)\nBreak revenue into layers. For each product/service line:\n\n| Layer | Formula | Healthy Range |\n|-------|---------|--------------|\n| Gross Margin | (Revenue - COGS) / Revenue | 60-80% (SaaS), 30-50% (services), 20-40% (manufacturing) |\n| Contribution Margin | (Revenue - Variable Costs) / Revenue | 40-70% |\n| Operating Margin | EBIT / Revenue | 15-30% (mature), -20-10% (growth) |\n| Net Margin | Net Income / Revenue | 10-25% (healthy), varies by stage |\n\n### Step 2: Margin by Segment\nSplit margins across:\n- **Product lines** — which products subsidize others?\n- **Customer tiers** — enterprise vs mid-market vs SMB\n- **Channels** — direct sales vs partner vs self-serve\n- **Geography** — domestic vs international (FX, compliance costs)\n\n### Step 3: Erosion Detection\nFlag these patterns:\n- Gross margin declining >2% QoQ without volume increase\n- Discount frequency increasing (>30% of deals discounted)\n- Customer acquisition cost (CAC) growing faster than LTV\n- Support costs per customer rising (hidden COGS)\n- Infrastructure costs scaling faster than revenue\n\n### Step 4: Pricing Power Assessment\nScore 1-5 on each:\n1. **Switching costs** — how hard is it to leave?\n2. **Differentiation** — can customers get this elsewhere?\n3. **Value quantification** — can you prove $ ROI?\n4. **Market position** — leader, challenger, or commodity?\n5. **Contract structure** — annual, multi-year, usage-based?\n\nTotal 20+ = strong pricing power. Below 12 = commodity risk.\n\n### Step 5: Optimization Levers\n\n**Revenue side:**\n- Price increase (1% price increase = 8-12% profit increase for most businesses)\n- Upsell/cross-sell (expansion revenue at near-zero marginal cost)\n- Usage-based pricing tiers (capture value from power users)\n- Annual prepay discounts (improve cash flow, lock retention)\n\n**Cost side:**\n- Vendor renegotiation (benchmark against 3+ alternatives)\n- Infrastructure right-sizing (cloud cost audits save 20-40%)\n- Automation of manual processes (support, onboarding, billing)\n- Headcount-to-revenue ratio optimization\n\n### Step 6: Scenario Modeling\nBuild three scenarios for next 4 quarters:\n\n| Scenario | Revenue Growth | Margin Change | Action |\n|----------|---------------|---------------|--------|\n| Base | Current trajectory | Flat | Maintain |\n| Bull | +20% growth | +3-5% margin | Invest in scaling |\n| Bear | -10% decline | -5-8% margin | Cut to protect cash |\n\nFor each: model cash runway, breakeven timeline, and hiring capacity.\n\n## 2026 Benchmarks by Industry\n\n| Industry | Gross Margin | Operating Margin | Net Margin |\n|----------|-------------|-----------------|------------|\n| SaaS (B2B) | 70-85% | 15-30% | 10-25% |\n| Professional Services | 50-70% | 15-25% | 10-20% |\n| Fintech | 60-75% | 10-25% | 8-20% |\n| Healthcare Tech | 55-70% | 10-20% | 5-15% |\n| Manufacturing | 25-45% | 8-15% | 5-12% |\n| E-commerce | 30-50% | 5-15% | 3-10% |\n| Construction Tech | 35-55% | 10-20% | 5-12% |\n| Legal Tech | 65-80% | 20-35% | 15-25% |\n| Real Estate Tech | 40-60% | 10-20% | 5-15% |\n| Recruitment Tech | 55-70% | 12-22% | 8-18% |\n\n## Red Flags\n- Gross margin below industry median for 2+ quarters\n- Negative contribution margin on any product (you're paying customers to use it)\n- Operating margin declining while revenue grows (scaling inefficiency)\n- Net margin negative with no clear path to breakeven\n- Customer concentration >30% of revenue from top 3 accounts\n\n## Output Template\n```\nMARGIN ANALYSIS — [Company/Division] — [Period]\n\nRevenue: $X | Gross Margin: X% | Operating Margin: X% | Net Margin: X%\nQoQ Trend: [improving/flat/declining]\nvs Industry Benchmark: [above/at/below] by X%\n\nTOP 3 FINDINGS:\n1. [Finding + $ impact]\n2. [Finding + $ impact]\n3. [Finding + $ impact]\n\nRECOMMENDATIONS:\n1. [Action] → Expected margin impact: +X%\n2. [Action] → Expected margin impact: +X%\n3. [Action] → Expected margin impact: +X%\n\n90-DAY PRIORITY: [Single highest-leverage action]\n```\n\n## Resources\n- [AI Revenue Leak Calculator](https://afrexai-cto.github.io/ai-revenue-calculator/) — find where margins are eroding\n- [Industry Context Packs](https://afrexai-cto.github.io/context-packs/) ($47) — vertical-specific margin benchmarks and optimization playbooks\n- [Agent Setup Wizard](https://afrexai-cto.github.io/agent-setup/) — automate margin monitoring with AI agents\n","tags":{"business":"1.0.0","finance":"1.0.0","latest":"1.0.0","margin":"1.0.0","pricing":"1.0.0","profit":"1.0.0"},"stats":{"comments":0,"downloads":984,"installsAllTime":37,"installsCurrent":4,"stars":1,"versions":1},"createdAt":1771703124659,"updatedAt":1778491601423},"latestVersion":{"version":"1.0.0","createdAt":1771703124659,"changelog":"Initial release of afrexai-margin-analysis skill.\n\n- Provides a structured framework for margin analysis and profit optimization.\n- Breaks down margins by product, customer segment, and channel.\n- Includes margin erosion detection, pricing power assessment, and practical optimization levers.\n- Offers scenario modeling templates and 2026 industry benchmarks.\n- Lists red flags and provides a standardized output template for reporting.\n- Links to supporting calculators and vertical-specific resources.","license":null},"metadata":null,"owner":{"handle":"1kalin","userId":"s17e1q0nx23qnh4n429zzqc05x83hvsw","displayName":"1kalin","image":"https://avatars.githubusercontent.com/u/15705344?v=4"},"moderation":null}