A Rough Cost Estimation Framework
Do this calculation before you deploy a workflow:
-
Estimate the system prompt size: Count the words in your system prompt. Multiply by 1.35 to get tokens (rough conversion).
-
Estimate average input data size: How many tokens of actual input data does each workflow run send? (Emails: ~300 tokens each; weather data: ~50 tokens; API responses: varies. Check your workflow logs.)
-
Estimate average output size: How many tokens of output does the AI produce? (2-3 sentence summary: ~50 tokens; JSON response: ~80 tokens; longer analysis: ~200 tokens.)
-
Calculate tokens per run: system prompt tokens + average input tokens + average output tokens = tokens per run.
-
Calculate runs per month: estimate how many times the workflow runs per month.
-
Calculate total tokens per month: tokens per run × runs per month = total tokens per month.
-
Look up pricing: input tokens × input price + output tokens × output price = total cost per month.
Example: Inbox Triage workflow
- System prompt: 150 words = ~200 tokens
- Average email: 300 tokens
- Average output (JSON): 100 tokens
- Tokens per run: 600
- Expected runs per month: 2000 (roughly 65 per day)
- Total tokens: 600 × 2000 = 1.2 million tokens per month
- Breakdown: ~400k input tokens (prompt + email), ~200k output tokens
- Using Claude Haiku: (400k × $0.80 + 200k × $4) / 1,000,000 = ~$1.60 per month
Trivial.
Now scale that to 10,000 emails per month: - Tokens per run: 600 - Total tokens: 600 × 10,000 = 6 million - Cost: (5m × $0.80 + 1m × $4) / 1m = ~$8.00 per month
Still affordable.
But if you used Claude 3.5 Sonnet instead of Haiku: - (5m × $3 + 1m × $15) / 1m = $30 per month
Suddenly it matters.