LLM Margin Calculator

Calculate the gross margin of your AI-powered product. See your cost per query, margin per user, recommended price points, and the exact volume needed to hit your target margin.

LLM Cost Inputs

$
$

Additional Costs & Revenue

$
$
$
%

Margin Results

LLM Cost / Query
API cost only
Total Cost / Query
all-in variable cost
Gross Margin
on query revenue
Net Monthly Profit
after fixed costs
Monthly Revenue
Break-Even Volume
queries/mo to cover fixed costs

Gross margin gauge

0%25% (thin)50% (ok)75% (healthy)100%

Cost vs Revenue per query

Pricing Sensitivity Table

How margin changes at different price points for your current usage

Charge/QueryMonthly RevenueGross MarginNet Profit/LossVerdict

LLM Cost Per Query = (Input Tokens × Input Price/MTok + Output Tokens × Output Price/MTok) ÷ 1,000,000

Total Variable Cost Per Query = LLM cost + other per-query costs (infra, embeddings, DB reads, etc.)

Gross Margin = (Revenue per query − Variable cost per query) ÷ Revenue per query × 100. This is the margin before fixed costs — the pure unit economics of your AI product.

Net Monthly Profit = (Revenue per query − Variable cost per query) × monthly queries − fixed monthly costs.

Break-Even Volume = Fixed monthly costs ÷ Gross profit per query. The minimum query volume needed to cover your infrastructure and operations before turning profitable.

Target Price for Margin = Variable cost per query ÷ (1 − target margin %). For a 70% margin target: price = cost ÷ 0.30.

⚠️ LLM pricing changes frequently. Verify current rates with your provider before making pricing decisions. Gross margin shown is on query revenue only and excludes R&D, sales, and marketing costs.