Skip to content
Profit

How to Calculate Gross Margin for an AI Agency

Gross margin versus operating margin, with formulas and a worked agency example.

The two formulas, used consistently across every AgentMargin calculator:

  • Gross profit = Revenue − Direct costs (AI, voice, telephony, hosting, delivery labor)
  • Gross margin % = Gross profit ÷ Revenue × 100

Worked example — 6 clients × $750 retainer = $4,500 MRR. Direct AI cost $900, support $1,200, contractors $2,000, software $300, other $400:

MeasureCalculationResult
Gross profit$4,500 − $900$3,600.00
Gross margin$3,600 ÷ $4,500 × 10080%
Operating expenses$1,200 + $2,000 + $300 + $400$3,900.00
Operating profit (est.)$3,600 − $3,900-$300.00

This agency has an excellent gross margin but loses money on an operating basis — the classic pattern where delivery is profitable and overhead is not. Gross margin and operating margin are different measures; never present them interchangeably. Check both in the Agency Profit Calculator.

AgentMargin provides estimates based on the information and pricing assumptions entered by the user. Provider pricing, taxes, usage, and service terms may change. Verify current charges with each provider before setting client prices. This tool does not guarantee profitability.

AgentMargin provides estimates based on the information and pricing assumptions entered by the user. Provider pricing, taxes, usage, and service terms may change. Verify current charges with each provider before setting client prices. This tool does not guarantee profitability.