Estimate and analyze costs for AI/cloud services, infrastructure, or feature implementations. Use when user asks "how much will this cost", "cost estimate", "cost analysis", "what's the pricing", "budget for this", or wants to understand the financial impact of a technical decision. Covers LLM API costs, cloud hosting, and SaaS tools.
Always verify current prices at the provider's pricing page - these change frequently.
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| Claude Opus 4 | ~$15 | ~$75 |
| Claude Sonnet 4 | ~$3 | ~$15 |
| Claude Haiku 3.5 | ~$0.80 | ~$4 |
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| GPT-4o | ~$2.50 | ~$10 |
| GPT-4o mini | ~$0.15 | ~$0.60 |
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| Gemini 2.5 Pro | ~$1.25 | ~$10 |
| Gemini 2.5 Flash | ~$0.15 | ~$0.60 |
Rough approximations:
def estimate_cost(
input_tokens: int,
output_tokens: int,
input_price_per_million: float,
output_price_per_million: float
) -> float:
input_cost = (input_tokens / 1_000_000) * input_price_per_million
output_cost = (output_tokens / 1_000_000) * output_price_per_million
return input_cost + output_cost
# Example: 1000 requests with 500 input tokens, 200 output tokens each
# Using Claude Sonnet ($3 in, $15 out per 1M)
total_input = 1000 * 500 # 500K tokens
total_output = 1000 * 200 # 200K tokens
cost = estimate_cost(total_input, total_output, 3, 15)
# = $0.15 + $3.00 = $3.15 for 1000 requests
| Service | Small | Medium | Large |
|---|---|---|---|
| Vercel (hobby) | Free | $20/mo | $150+/mo |
| Render (web service) | $7/mo | $25/mo | $85+/mo |
| Hetzner VPS | €5/mo | €20/mo | €80+/mo |
| AWS EC2 (t3) | $15/mo | $60/mo | $250+/mo |
When asked to estimate costs:
COST ESTIMATE: [Feature/Service]
Assumptions:
- [usage volume]
- [average token counts]
- [model/provider]
Monthly estimate:
- API calls: [N] × $[X] = $[Y]/month
- Hosting: $[Z]/month
- Total: ~$[TOTAL]/month
At scale (10x):
- Total: ~$[10x TOTAL]/month
Recommendation: [cheapest option that meets requirements]