Formula
Gross margin = (revenue − cost of revenue) ÷ revenue × 100
What counts as cost of revenue
| Business | Typical direct costs |
|---|---|
| SaaS | Hosting and infrastructure, third-party services used by the product, payment fees, often customer support |
| AI products | Model/API usage or GPU costs, hosting, data costs, payment fees |
| Ecommerce | Cost of goods, inbound shipping, fulfillment, payment fees |
| Apps | App-store commissions, backend services |
Be consistent from month to month, and state what you include.
Example
An AI writing tool earns $12,000 in a month. It pays $3,600 for model usage, $600 for hosting and $360 in payment fees.
Gross margin = ($12,000 − $4,560) ÷ $12,000 = 62%.
Why gross margin matters for valuation
Gross margin sets how much of each new dollar of revenue can turn into profit. A software business with high gross margin can grow profit quickly as revenue grows; a business with low gross margin needs far more revenue to earn the same profit.
For AI businesses, gross margin is especially important, because model costs can take a large and changing share of revenue. VALUERAQ's SaaS and AI tools raise the multiple slightly for margins above 80% and lower it for margins below 70%, more steeply below 50%. See the methodology.