Appearance
Cost Savings Calculator ​
Use this calculator to estimate your savings with the implemented optimizations.
Variables ​
D = Number of developers
Q = Questions per developer per day
WD = Working days per month (typically 22)
S = Percentage of queries that are summaries (0-100)
C = Cache hit rate expected (typically 20-40%)Formulas ​
Monthly Query Volume ​
Total Queries = D × Q × WDBaseline Cost (All Sonnet) ​
Baseline = Total Queries × $0.016Cost After Strategy 2 (Smart Models) ​
Summary Queries = Total Queries × (S / 100)
Deep Queries = Total Queries × ((100 - S) / 100)
Cost After S2 = (Summary Queries × $0.0065) + (Deep Queries × $0.016)
Savings S2 = Baseline - Cost After S2Cost After Strategy 4 (Caching) ​
Uncached Queries = Cost After S2 × (1 - C/100)
Cached Queries = Cost After S2 × (C/100)
Cost After S4 = Uncached Queries + (Cached Queries × $0)
= Cost After S2 × (1 - C/100)
Savings S4 = Cost After S2 × (C/100)Total Savings ​
Total Savings = Savings S2 + Savings S4
Final Cost = Cost After S2 - Savings S4
Savings % = (Total Savings / Baseline) × 100Examples ​
Example 1: Small Team (5 developers) ​
Variables:
D = 5
Q = 5 questions/day
WD = 22 working days
S = 25% summaries
C = 30% cache hit
Calculations:
Total Queries = 5 × 5 × 22 = 550
Baseline:
Cost = 550 × $0.016 = $8.80
After Strategy 2 (Smart Models):
Summaries = 550 × 0.25 = 137.5
Deep = 550 × 0.75 = 412.5
Cost S2 = (137.5 × $0.0065) + (412.5 × $0.016)
= $0.89 + $6.60 = $7.49
Savings S2 = $8.80 - $7.49 = $1.31 (15%)
After Strategy 4 (Caching at 30%):
Cost S4 = $7.49 × (1 - 0.30) = $5.24
Savings S4 = $7.49 × 0.30 = $2.25
Total Savings:
Total = $1.31 + $2.25 = $3.56
Final Cost = $8.80 - $3.56 = $5.24
Savings % = ($3.56 / $8.80) × 100 = 40.5%✅ Small Team Saves: ~$3.50/month (40% reduction)
Example 2: Medium Team (20 developers) ​
Variables:
D = 20
Q = 10 questions/day
WD = 22 working days
S = 30% summaries
C = 35% cache hit
Calculations:
Total Queries = 20 × 10 × 22 = 4,400
Baseline:
Cost = 4,400 × $0.016 = $70.40
After Strategy 2 (Smart Models):
Summaries = 4,400 × 0.30 = 1,320
Deep = 4,400 × 0.70 = 3,080
Cost S2 = (1,320 × $0.0065) + (3,080 × $0.016)
= $8.58 + $49.28 = $57.86
Savings S2 = $70.40 - $57.86 = $12.54 (18%)
After Strategy 4 (Caching at 35%):
Cost S4 = $57.86 × (1 - 0.35) = $37.61
Savings S4 = $57.86 × 0.35 = $20.25
Total Savings:
Total = $12.54 + $20.25 = $32.79
Final Cost = $70.40 - $32.79 = $37.61
Savings % = ($32.79 / $70.40) × 100 = 46.6%✅ Medium Team Saves: ~$33/month (47% reduction)
Example 3: Large Scale (100 developers) ​
Variables:
D = 100
Q = 8 questions/day
WD = 22 working days
S = 35% summaries
C = 40% cache hit
Calculations:
Total Queries = 100 × 8 × 22 = 17,600
Baseline:
Cost = 17,600 × $0.016 = $281.60
After Strategy 2 (Smart Models):
Summaries = 17,600 × 0.35 = 6,160
Deep = 17,600 × 0.65 = 11,440
Cost S2 = (6,160 × $0.0065) + (11,440 × $0.016)
= $40.04 + $183.04 = $223.08
Savings S2 = $281.60 - $223.08 = $58.52 (21%)
After Strategy 4 (Caching at 40%):
Cost S4 = $223.08 × (1 - 0.40) = $133.85
Savings S4 = $223.08 × 0.40 = $89.23
Total Savings:
Total = $58.52 + $89.23 = $147.75
Final Cost = $281.60 - $147.75 = $133.85
Savings % = ($147.75 / $281.60) × 100 = 52.5%✅ Large Scale Saves: ~$148/month (52.5% reduction)
Your Scenario ​
Fill in your values:
D = _____ developers
Q = _____ questions/dev/day
WD = _____ working days/month (default: 22)
S = ____% summaries (estimate: 20-40%)
C = ____% cache hit rate (expect: 25-40%)
Total Queries = D × Q × WD = _____________
Baseline Cost = Total Queries × $0.016 = $_____________
Cost After S2 = (S% × $0.0065) + ((100-S)% × $0.016) = $_____________
= $_____________
Cost After S4 = Cost After S2 × (1 - C%) = $_____________
Total Savings = Baseline - Cost After S4 = $_____________
Savings % = (Total Savings / Baseline) × 100 = _______%
Final Monthly Cost = $_____________Breakeven Analysis ​
At what scale do optimizations pay for themselves?
Infrastructure Cost vs Savings ​
Monthly Infrastructure:
VPS UAT: $2.50
Domain: $1.00
Total: $3.50
If saving $3.50+/month → Optimizations pay for themselvesBreakeven Point:
- Small team (5 devs): Saves $3.50/month immediately ✅
- Any team size pays for infrastructure
Larger Infrastructure (Fly.io Production) ​
Monthly Infrastructure:
Fly.io APIs + Workers: $40
Supabase: $25
Total: $65
If saving $65+/month → Optimizations pay for themselvesBreakeven Point:
- Need ~15 developers asking ~5 questions/day
- Typical medium team meets this threshold
Monthly Cost Scenarios ​
Scenario 1: Startup (2 devs, light usage) ​
Baseline: 220 queries × $0.016 = $3.52/month
With Optimization: ~$1.80/month
Savings: $1.72/month (49%)Scenario 2: Pilot Team (10 devs, 5 Q/day) ​
Baseline: 2,200 queries × $0.016 = $35.20/month
With Optimization: ~$16.50/month
Savings: $18.70/month (53%)Scenario 3: Department (50 devs, 7 Q/day) ​
Baseline: 7,700 queries × $0.016 = $123.20/month
With Optimization: ~$57.50/month
Savings: $65.70/month (53%)Scenario 4: Enterprise (500 devs, 10 Q/day) ​
Baseline: 110,000 queries × $0.016 = $1,760/month
With Optimization: ~$800/month
Savings: $960/month (55%)ROI Timeline ​
Example: 50-person team with $250/month baseline ​
Month 1 (No optimization):
Cost: $250
Savings: $0
Cumulative: $0
Month 2-3 (Optimization live, low cache hit):
Cost: $200/month (20% savings)
Savings: $50/month
Cumulative: $100
Month 4-6 (Cache warming up):
Cost: $130/month (48% savings)
Savings: $120/month
Cumulative: $460
Month 7+ (Mature cache, full optimization):
Cost: $110/month (56% savings)
Savings: $140/month
Cumulative: $900+ (breakeven by month 7)Important Notes ​
Cache Hit Rate builds gradually:
- Week 1: 5-10%
- Month 1: 20-30%
- Month 3+: 40-50%
Summary Detection depends on team patterns:
- Conservative estimate: 20% summaries
- Typical: 30-35%
- High-summary teams: 40-50%
Seasonal Variation:
- Higher queries during sprints/releases
- Lower during planning/meetings
- Adjust monthly estimates accordingly
Cost per Model (Sonnet 3.5 is default):
- If you switch to Opus: costs 5x higher
- If you switch to Haiku: costs 2.5x lower
- Mixed model strategy gives best savings
Implementation Impact ​
Once implemented, you'll see:
✅ Week 1: Baseline metrics established, cost tracking enabled ✅ Week 2-3: Smart model routing active, summaries routed to Haiku ✅ Week 4: First cache hits appearing (5-10%) ✅ Month 2: Cache warming up (20-30% hit rate) ✅ Month 3+: Full optimization (40-50% hit rate, 50%+ cost reduction)
Questions? ​
Check the implementation guide: COST_OPTIMIZATION.md Check monitoring queries: COST_OPTIMIZATION.md → "Monitoring and Alerting"
Ready to deploy and start saving!