Skip to main content

Revenue Modeling

James had been staring at the cost table from the previous lesson. Sixty dollars a month. He understood where each dollar went. But understanding costs was only half the equation.

"I know what TutorClaw costs to run," he said. "What I don't know is whether it actually makes money. Sixty dollars is cheap, but cheap and profitable are not the same thing."

Emma pulled up a blank Python file. "Then stop guessing. Write a calculator, plug in the real numbers, and let the output tell you."


You are doing exactly what James is doing. You have a product that costs almost nothing to run. But does it make money? In this lesson, you build a Python script that answers that question with TutorClaw's actual numbers.

The Calculator

You can run this two ways: save it as economics.py and run it in your terminal, or paste the script into a conversation with your AI assistant and ask it to execute with TutorClaw's numbers. Either way, you get the same output.

Here is the complete script:

def calculate_economics(
total_learners: int,
free_fraction: float,
paid_fraction: float,
premium_fraction: float,
paid_price_usd: float,
premium_price_usd: float,
infra_cost: float,
stripe_percent: float,
stripe_flat: float,
):
"""Calculate monthly unit economics for a subscription product."""

# Learner counts per tier
free_count = int(total_learners * free_fraction)
paid_count = int(total_learners * paid_fraction)
premium_count = total_learners - free_count - paid_count

# Monthly revenue per tier
free_revenue = 0.0
paid_revenue = paid_count * paid_price_usd
premium_revenue = premium_count * premium_price_usd
gross_revenue = free_revenue + paid_revenue + premium_revenue

# Stripe fees: percentage + flat fee on every paid transaction
paying_customers = paid_count + premium_count
stripe_percentage_fees = gross_revenue * stripe_percent
stripe_flat_fees = paying_customers * stripe_flat
total_stripe_fees = stripe_percentage_fees + stripe_flat_fees

# Net revenue and margin
total_costs = infra_cost + total_stripe_fees
net_revenue = gross_revenue - total_costs
gross_margin = (net_revenue / gross_revenue * 100) if gross_revenue > 0 else 0.0

# Print results
print("=" * 50)
print("UNIT ECONOMICS REPORT")
print("=" * 50)
print()
print(f"Learners: {total_learners:,}")
print(f" Free: {free_count:,} ({free_fraction:.0%})")
print(f" Paid: {paid_count:,} ({paid_fraction:.0%}) @ ${paid_price_usd}/mo")
print(f" Premium: {premium_count:,} ({premium_fraction:.0%}) @ ${premium_price_usd}/mo")
print()
print(f"Gross revenue: ${gross_revenue:,.2f}/mo")
print(f" Paid tier: ${paid_revenue:,.2f}")
print(f" Premium tier: ${premium_revenue:,.2f}")
print()
print(f"Costs:")
print(f" Infrastructure: ${infra_cost:,.2f}/mo")
print(f" Stripe fees: ${total_stripe_fees:,.2f}/mo")
print(f" Percentage: ${stripe_percentage_fees:,.2f}")
print(f" Flat fees: ${stripe_flat_fees:,.2f}")
print(f" Total costs: ${total_costs:,.2f}/mo")
print()
print(f"Net revenue: ${net_revenue:,.2f}/mo")
print(f"Gross margin: {gross_margin:.1f}%")
print("=" * 50)


# TutorClaw's actual numbers
calculate_economics(
total_learners=16_000,
free_fraction=0.75,
paid_fraction=0.19,
premium_fraction=0.06,
paid_price_usd=1.75,
premium_price_usd=10.50,
infra_cost=60.00,
stripe_percent=0.029,
stripe_flat=0.30,
)

Read through the script before running it. Every input maps to a number from the cost structure you studied in Lesson 3: 16,000 learners, 75% free, 19% paid at $1.75/month, 6% premium at $10.50/month, $60/month infrastructure (the midpoint of the $50-70 range), and Stripe's standard 2.9% + $0.30 per transaction.

Run It

If you saved the file locally:

python economics.py

If you are working in OpenClaw, paste the script and ask your AI to run it with TutorClaw's defaults.

The output:

==================================================
UNIT ECONOMICS REPORT
==================================================

Learners: 16,000
Free: 12,000 (75%)
Paid: 3,040 (19%) @ $1.75/mo
Premium: 960 (6%) @ $10.50/mo

Gross revenue: $15,400.00/mo
Paid tier: $5,320.00
Premium tier: $10,080.00

Costs:
Infrastructure: $60.00/mo
Stripe fees: $1,646.60/mo
Percentage: $446.60
Flat fees: $1,200.00
Total costs: $1,706.60/mo

Net revenue: $13,693.40/mo
Gross margin: 88.9%
==================================================

Wait. Look at that Stripe flat fee line: $1,200.00. That is 4,000 paying customers multiplied by $0.30 each. The percentage fee is $446.60 (2.9% of $15,400). But the flat fee is nearly three times the percentage fee.

At $1.75/month, Stripe's $0.30 flat fee per transaction eats 17% of each paid-tier subscription. For the premium tier at $10.50, that same $0.30 is only 2.9%. The flat fee hits low-price subscriptions disproportionately hard.

Why These Numbers Differ from the Source Tables

Two differences explain the gap. First, the source tables in Lesson 3 use round learner counts (12,000 / 3,000 / 1,000), giving $15,750 in revenue. The calculator uses int(16000 * 0.19) = 3,040 and 16000 - 12000 - 3040 = 960, giving $15,400. Second, and more importantly, the Lesson 3 estimate of ~$450 in Stripe fees covered only the 2.9% percentage component. This calculator includes both the percentage fee ($447) and the $0.30 flat fee on every transaction ($1,200), totaling $1,647. The flat fee is the dominant Stripe cost at low price points. Use the calculator's output for financial planning.

What the Numbers Mean

Three things to notice in the output:

Gross revenue is driven by the premium tier. Premium subscribers are only 6% of learners, but they contribute $10,080 of the $15,400 gross revenue (65%). The paid tier's 19% of learners contributes 35%. This is a common pattern in freemium models: a small percentage of high-value customers generates most of the revenue.

Infrastructure is negligible. At $60/month, infrastructure is 0.4% of gross revenue. This is the Great Inversion at work. Architecture 4 pushes compute to the learner, so the operator's infrastructure cost stays flat regardless of learner count. Whether you have 1,000 learners or 100,000, the MCP server, R2 storage, and database cost roughly the same.

Stripe is the real cost center. Total Stripe fees ($1,646.60) are 27 times the infrastructure cost ($60). Payment processing, not compute, is the dominant expense. This is the hidden reality of low-price subscriptions: the payment processor takes a larger share when the transaction amount is small.

Try With AI

Exercise 1: Run the Calculator with TutorClaw Defaults

Run the calculator with TutorClaw's defaults (either locally or through your AI assistant). Compare your output to the expected output in this lesson. If the numbers match, you have the calculator working. Then ask your AI assistant:

I just ran a unit economics calculator for a subscription product
with 16,000 users (75% free, 19% paid at $1.75/mo, 6% premium
at $10.50/mo). Infrastructure costs $60/mo. Stripe charges 2.9%
+ $0.30 per transaction. The gross margin came out to about 89%.

Explain why the Stripe flat fee ($0.30 per transaction) has a
bigger impact than the percentage fee (2.9%) at this price point.
At what subscription price does the percentage fee overtake the
flat fee as the larger cost?

What you are learning: The relationship between transaction size and payment processing costs. At low price points, flat fees dominate. This is why many micro-subscription products batch payments quarterly or annually: fewer transactions means fewer flat fees.

Exercise 2: Find the Break-Even Conversion Rate

Change the paid_fraction to lower values and re-run the script. Start at 0.10 (10%), then try 0.05 (5%), then go lower. Find the conversion rate where net revenue drops to zero or below.

I am modeling a freemium subscription product where paid users
pay $1.75/mo and premium users pay $10.50/mo. Infrastructure
is $60/mo. Stripe takes 2.9% + $0.30 per transaction.

If I keep the premium fraction at 6% and lower the paid fraction,
at what paid conversion rate does the product stop being profitable?

Walk me through the break-even calculation step by step. What
assumptions does this break-even ignore (like salaries, marketing,
development costs)?

What you are learning: Break-even analysis reveals how resilient a business model is. If TutorClaw stays profitable even at very low conversion rates, the model has a wide margin of safety. But break-even on infrastructure costs is not the same as break-even on total business costs; salaries and development are not included in this calculation.

Exercise 3: Model a Different Product

Replace the TutorClaw numbers with a hypothetical product of your own. Change the learner count, tier split, prices, and infrastructure cost. Run the calculator and compare the margin to TutorClaw's.

I want to model the unit economics of a different AI product.
Here are my inputs:
- 5,000 users (60% free, 25% paid at $9/mo, 15% premium at $29/mo)
- Infrastructure: $200/mo (I'm running my own LLM inference)
- Stripe: 2.9% + $0.30

Calculate the gross revenue, Stripe fees, net revenue, and gross
margin. Then compare this to an Architecture 4 version of the same
product where infrastructure drops to $60/mo because the user
provides their own LLM. How much does the margin change?

What you are learning: The calculator is a general tool, not a TutorClaw-specific tool. By swapping inputs, you can model any subscription product. The comparison between "you run the LLM" and "the user runs the LLM" is the Great Inversion applied to your own product idea.


James leaned back from his screen. "The margin is not about low costs. I mean, sixty dollars a month is low. But Stripe alone is twenty-seven times the infrastructure. The margin comes from the fact that learners bring their own compute."

"That is the Great Inversion in one sentence," Emma said.

"It is like a franchise," James said. "The franchisor does not pay for the franchisee's rent, electricity, or staff. The franchisor sells the playbook. The franchisee funds the operation. The franchisor's margin is almost pure because their costs are just maintaining the playbook."

Emma nodded slowly. "That is a better analogy than I had. I was going to say it is like an API, but a franchise captures the economic relationship better." She paused. "I should be honest about something, though. I have not modeled what happens when you scale beyond 50,000 learners on a single VPS. The cost table assumes a fixed infrastructure bracket. At some point, PostgreSQL needs a larger instance, the VPS needs more RAM for concurrent SSE connections, and the cost steps up. I do not know exactly where that step function kicks in. The architecture is sound, but the exact cost curve at high scale is an open question."

"So the calculator works for today's numbers, but the inputs change as you grow."

"Exactly. And the next question is whether TutorClaw's architecture is actually the best option, or just the one we built. There were three other ways to build this product. Time to compare all four."

Flashcards Study Aid