cost-estimator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cost Estimator

成本估算

Provides frameworks for estimating infrastructure costs, development effort, and total cost of ownership (TCO) for technical projects.
提供技术项目的基础设施成本、研发投入以及总拥有成本(TCO)的估算框架。

When to Use

适用场景

  • Planning infrastructure budgets
  • Evaluating build vs. buy decisions
  • Projecting costs at different scale points
  • Comparing technology options by cost
  • Creating business cases for technical investments
  • 规划基础设施预算
  • 评估自研vs采购决策
  • 测算不同规模节点下的成本
  • 按成本维度对比技术选型
  • 为技术投资搭建商业论证案例

Cost Categories

成本分类

Total Cost of Ownership (TCO)

总拥有成本(TCO)

TCO = Infrastructure + Development + Operations + Opportunity Cost

┌─────────────────────────────────────────────────────────────────┐
│                    TOTAL COST OF OWNERSHIP                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  Infrastructure    Development    Operations    Opportunity      │
│  ────────────────  ────────────   ──────────    ────────────     │
│  • Compute         • Engineering  • Support     • What else      │
│  • Storage         • QA           • Monitoring  • could team     │
│  • Network         • DevOps       • On-call     • be building?   │
│  • Third-party     • Management   • Training                     │
│    APIs/SaaS       • Contractors  • Incidents                    │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

TCO = Infrastructure + Development + Operations + Opportunity Cost

┌─────────────────────────────────────────────────────────────────┐
│                    TOTAL COST OF OWNERSHIP                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  Infrastructure    Development    Operations    Opportunity      │
│  ────────────────  ────────────   ──────────    ────────────     │
│  • Compute         • Engineering  • Support     • What else      │
│  • Storage         • QA           • Monitoring  • could team     │
│  • Network         • DevOps       • On-call     • be building?   │
│  • Third-party     • Management   • Training                     │
│    APIs/SaaS       • Contractors  • Incidents                    │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Infrastructure Cost Reference

基础设施成本参考

Cloud Compute Pricing (2024-2025)

云计算定价(2024-2025)

AWS EC2 On-Demand (US regions)

AWS EC2按需实例(美国区域)

InstancevCPURAMMonthly CostBest For
t3.micro21GB$8Dev/test
t3.medium24GB$30Small apps
t3.large28GB$60Light production
m6i.large28GB$70General production
m6i.xlarge416GB$140Medium workloads
m6i.2xlarge832GB$280Heavy workloads
c6i.2xlarge816GB$250CPU-intensive
r6i.2xlarge864GB$370Memory-intensive
实例类型vCPURAM月成本适用场景
t3.micro21GB$8开发/测试
t3.medium24GB$30小型应用
t3.large28GB$60轻量生产环境
m6i.large28GB$70通用生产环境
m6i.xlarge416GB$140中等负载
m6i.2xlarge832GB$280重负载
c6i.2xlarge816GB$250CPU密集型负载
r6i.2xlarge864GB$370内存密集型负载

GPU Instances

GPU实例

InstanceGPUVRAMMonthly CostBest For
g4dn.xlargeT416GB$380Inference
g5.xlargeA10G24GB$730ML training/inference
p4d.24xlarge8x A100320GB$23,000Large model training
实例类型GPUVRAM月成本适用场景
g4dn.xlargeT416GB$380模型推理
g5.xlargeA10G24GB$730ML训练/推理
p4d.24xlarge8x A100320GB$23,000大模型训练

Savings Options

成本节省方案

PlanSavingsCommitment
On-Demand0%None
Reserved (1yr)30-40%1 year
Reserved (3yr)50-60%3 years
Spot Instances60-90%Can be interrupted
方案节省比例承诺要求
按需实例0%
预留实例(1年)30-40%1年
预留实例(3年)50-60%3年
竞价实例60-90%可被中断

Database Pricing

数据库定价

Managed Database (AWS RDS PostgreSQL)

托管数据库(AWS RDS PostgreSQL)

InstancevCPURAMMonthly CostConnections
db.t3.micro21GB$1550
db.t3.medium24GB$50100
db.m6g.large28GB$120200
db.m6g.xlarge416GB$240400
db.r6g.xlarge432GB$350500
db.r6g.2xlarge864GB$7001000
Add for storage: $0.115/GB/month (gp3) Add for IOPS: $0.02/IOPS/month (over 3000 baseline)
实例类型vCPURAM月成本最大连接数
db.t3.micro21GB$1550
db.t3.medium24GB$50100
db.m6g.large28GB$120200
db.m6g.xlarge416GB$240400
db.r6g.xlarge432GB$350500
db.r6g.2xlarge864GB$7001000
存储额外费用: $0.115/GB/月 (gp3) IOPS额外费用: $0.02/IOPS/月 (超出3000基准部分)

Redis/ElastiCache

Redis/ElastiCache

Node TypeRAMMonthly Cost
cache.t3.micro0.5GB$12
cache.t3.medium3GB$50
cache.m6g.large6.4GB$100
cache.r6g.large13GB$175
节点类型RAM月成本
cache.t3.micro0.5GB$12
cache.t3.medium3GB$50
cache.m6g.large6.4GB$100
cache.r6g.large13GB$175

Storage Pricing

存储定价

ServiceCostUse Case
S3 Standard$0.023/GBFrequently accessed
S3 Infrequent$0.0125/GBBackups, archives
S3 Glacier$0.004/GBLong-term archive
EBS gp3$0.08/GBBlock storage
EBS io2$0.125/GB + IOPSHigh performance
服务成本适用场景
S3标准存储$0.023/GB高频访问数据
S3低频访问存储$0.0125/GB备份、归档
S3 Glacier$0.004/GB长期归档
EBS gp3$0.08/GB块存储
EBS io2$0.125/GB + IOPS费用高性能场景

Network Costs (Often Overlooked!)

网络成本(经常被忽略!)

Traffic TypeCost
Data INFree
Data OUT (first 10TB)$0.09/GB
Data OUT (next 40TB)$0.085/GB
Inter-AZ transfer$0.01/GB each way
Inter-region transfer$0.02/GB
CloudFront to internet$0.085/GB

流量类型成本
入站流量免费
出站流量(前10TB)$0.09/GB
出站流量(后续40TB)$0.085/GB
可用区内部传输双向各$0.01/GB
跨区域传输$0.02/GB
CloudFront到公网$0.085/GB

Development Cost Estimation

开发成本估算

Engineering Cost Framework

研发成本框架

Development Cost = (Hours × Hourly Rate) × Complexity Factor × Risk Buffer

Hourly Rate (Fully Loaded):
- Junior Engineer: $75-100/hr
- Mid-level Engineer: $100-150/hr
- Senior Engineer: $150-200/hr
- Staff/Principal: $200-300/hr

Complexity Factors:
- Greenfield, known tech: 1.0x
- Existing codebase, known tech: 1.2x
- New technology for team: 1.5x
- Complex integrations: 1.3x
- Regulatory/compliance: 1.4x

Risk Buffer:
- Well-defined requirements: 1.2x
- Ambiguous requirements: 1.5x
- Experimental/R&D: 2.0x
Development Cost = (Hours × Hourly Rate) × Complexity Factor × Risk Buffer

Hourly Rate (Fully Loaded):
- Junior Engineer: $75-100/hr
- Mid-level Engineer: $100-150/hr
- Senior Engineer: $150-200/hr
- Staff/Principal: $200-300/hr

Complexity Factors:
- Greenfield, known tech: 1.0x
- Existing codebase, known tech: 1.2x
- New technology for team: 1.5x
- Complex integrations: 1.3x
- Regulatory/compliance: 1.4x

Risk Buffer:
- Well-defined requirements: 1.2x
- Ambiguous requirements: 1.5x
- Experimental/R&D: 2.0x

Story Point to Cost Mapping

故事点到成本映射

SizeStory PointsHoursCost (Mid-level)
XS12-4$200-400
S24-8$400-800
M38-16$800-1,600
L516-32$1,600-3,200
XL832-64$3,200-6,400
XXL13+64+$6,400+
规模故事点工时成本(中级工程师)
XS12-4$200-400
S24-8$400-800
M38-16$800-1,600
L516-32$1,600-3,200
XL832-64$3,200-6,400
XXL13+64+$6,400+

Team Cost Calculator

团队成本计算器

markdown
undefined
markdown
undefined

Monthly Team Cost

月度团队成本

Engineering Team:
  • 2 Senior Engineers × $15,000 = $30,000
  • 3 Mid-level Engineers × $10,000 = $30,000
  • 1 Engineering Manager × $18,000 = $18,000
Overhead (benefits, tools, etc.): 30% Monthly Burn: ($78,000) × 1.3 = $101,400
Annual Team Cost: ~$1.2M

---
研发团队:
  • 2名高级工程师 × $15,000 = $30,000
  • 3名中级工程师 × $10,000 = $30,000
  • 1名研发经理 × $18,000 = $18,000
间接成本(福利、工具等): 30% 月度支出: ($78,000) × 1.3 = $101,400
年度团队成本: ~$1.2M

---

Build vs. Buy Analysis

自研vs采购分析

Decision Framework

决策框架

Build vs Buy Decision Matrix:

                    LOW Differentiation    HIGH Differentiation
                   ┌────────────────────┬────────────────────┐
    HIGH Volume/   │                    │                    │
    Usage          │     Consider       │       BUILD        │
                   │      Build         │    (competitive    │
                   │   (cost savings)   │     advantage)     │
                   ├────────────────────┼────────────────────┤
    LOW Volume/    │                    │                    │
    Usage          │       BUY          │       BUY          │
                   │   (no question)    │  (then consider    │
                   │                    │   build if scales) │
                   └────────────────────┴────────────────────┘
Build vs Buy Decision Matrix:

                    LOW Differentiation    HIGH Differentiation
                   ┌────────────────────┬────────────────────┐
    HIGH Volume/   │                    │                    │
    Usage          │     Consider       │       BUILD        │
                   │      Build         │    (competitive    │
                   │   (cost savings)   │     advantage)     │
                   ├────────────────────┼────────────────────┤
    LOW Volume/    │                    │                    │
    Usage          │       BUY          │       BUY          │
                   │   (no question)    │  (then consider    │
                   │                    │   build if scales) │
                   └────────────────────┴────────────────────┘

TCO Comparison Template

TCO对比模板

markdown
undefined
markdown
undefined

Option A: Build Custom Solution

方案A: 自研定制方案

Initial Development

初始开发成本

  • Engineering time: X months × $Y/month = $Z
  • Infrastructure setup: $A
  • 研发投入: X个月 × $Y/月 = $Z
  • 基础设施搭建: $A

Ongoing Costs (Annual)

持续成本(年度)

  • Infrastructure: $B
  • Maintenance (20% of dev time): $C
  • On-call/support: $D
  • 基础设施: $B
  • 维护成本(开发人力的20%): $C
  • 值班/支持: $D

3-Year TCO

3年TCO

Year 1: $Z + $A + $B + $C + $D Year 2: $B + $C + $D Year 3: $B + $C + $D Total: $XXX

第1年: $Z + $A + $B + $C + $D 第2年: $B + $C + $D 第3年: $B + $C + $D 总计: $XXX

Option B: Buy SaaS Solution

方案B: 采购SaaS方案

Initial Costs

初始成本

  • Implementation/integration: $X
  • Training: $Y
  • 实施/集成: $X
  • 培训: $Y

Ongoing Costs (Annual)

持续成本(年度)

  • License fees: $Z/year
  • Per-user costs: $A × users
  • API costs: $B
  • 授权费: $Z/年
  • 按用户收费: $A × 用户数
  • API费用: $B

3-Year TCO

3年TCO

Year 1: $X + $Y + $Z + $A + $B Year 2: $Z + $A + $B Year 3: $Z + $A + $B Total: $XXX
undefined
第1年: $X + $Y + $Z + $A + $B 第2年: $Z + $A + $B 第3年: $Z + $A + $B 总计: $XXX
undefined

Common Build vs Buy Scenarios

常见自研vs采购场景

CapabilityBuild WhenBuy When
AuthenticationUnique security requirementsStandard OAuth/OIDC works
PaymentsCore business differentiatorStandard e-commerce
SearchDomain-specific relevanceGeneric search needs
AnalyticsProprietary insights neededStandard dashboards work
EmailHigh volume, custom deliveryStandard transactional
ML/AIProprietary models neededPre-trained models work

能力适合自研的场景适合采购的场景
身份认证有特殊安全要求标准OAuth/OIDC即可满足需求
支付能力核心业务差异化点标准电商场景
搜索能力需要领域专属相关性排序通用搜索需求
数据分析需要专有数据洞察标准仪表盘即可满足需求
邮件服务高量级、自定义投递需求标准事务性邮件场景
ML/AI需要专有模型预训练模型即可满足需求

Cost Projection by Scale

不同规模的成本预测

SaaS Application Cost Model

SaaS应用成本模型

ScaleUsersMonthly InfraNotes
Startup0-1K$200-500Single server, managed DB
Growth1K-10K$500-2,000Load balancer, caching
Scale10K-100K$2,000-10,000Horizontal scaling
Enterprise100K-1M$10,000-50,000Multi-region, HA
Large1M+$50,000+Global, custom CDN
阶段用户量月度基础设施成本说明
初创期0-1K$200-500单服务器、托管数据库
成长期1K-10K$500-2,000负载均衡、缓存
扩张期10K-100K$2,000-10,000水平扩容
企业级100K-1M$10,000-50,000多区域、高可用
大型平台1M+$50,000+全球部署、定制CDN

Cost Per User Benchmarks

每用户成本基准

Application TypeCost/User/MonthNotes
Simple web app$0.05-0.20Static + API
Data-intensive$0.20-0.50Analytics, storage
Real-time$0.50-2.00WebSockets, streaming
ML-powered$1.00-5.00Inference costs
Video/media$2.00-10.00Transcoding, CDN
应用类型每用户月成本说明
简单Web应用$0.05-0.20静态页面+API
数据密集型应用$0.20-0.50数据分析、存储
实时应用$0.50-2.00WebSockets、流媒体
ML驱动应用$1.00-5.00模型推理成本
视频/媒体应用$2.00-10.00转码、CDN

E-commerce Cost Model

电商成本模型

markdown
undefined
markdown
undefined

Monthly Infrastructure Cost by GMV

月度基础设施成本(按GMV计算)

$0-100K GMV/month:
  • Basic infrastructure: $500
  • Payment processing (2.9%): ~$2,000
  • Total: ~$2,500
$100K-1M GMV/month:
  • Scaled infrastructure: $2,000
  • Payment processing: ~$20,000
  • Fraud protection: $500
  • Total: ~$22,500
$1M-10M GMV/month:
  • HA infrastructure: $10,000
  • Payment processing: ~$200,000
  • Fraud/security: $5,000
  • CDN/performance: $3,000
  • Total: ~$218,000

---
月GMV $0-100K:
  • 基础基础设施: $500
  • 支付手续费(2.9%): ~$2,000
  • 总计: ~$2,500
月GMV $100K-1M:
  • 扩容后基础设施: $2,000
  • 支付手续费: ~$20,000
  • 反欺诈: $500
  • 总计: ~$22,500
月GMV $1M-10M:
  • 高可用基础设施: $10,000
  • 支付手续费: ~$200,000
  • 反欺诈/安全: $5,000
  • CDN/性能优化: $3,000
  • 总计: ~$218,000

---

Hidden Cost Checklist

隐性成本检查清单

Often Missed in Estimates

估算中经常遗漏的项

Infrastructure:
  • Data transfer costs (egress)
  • Backup storage
  • Log storage (CloudWatch: $0.50/GB)
  • SSL certificates
  • DNS queries
  • Load balancer hours
Development:
  • Code reviews (add 20-30% to dev time)
  • Documentation
  • Testing infrastructure
  • CI/CD pipeline (GitHub Actions: $0.008/min)
  • Staging environments
Operations:
  • Monitoring tools (Datadog: ~$15/host/month)
  • Error tracking (Sentry: $26+/month)
  • Log management
  • On-call compensation
  • Incident response time
Third-Party Services:
  • Email (SendGrid: $0.00025-0.001/email)
  • SMS (Twilio: $0.0075/message)
  • Video (encoding, streaming)
  • Maps/geocoding (Google: $7/1K requests)

基础设施:
  • 数据传输成本(出站流量)
  • 备份存储
  • 日志存储(CloudWatch: $0.50/GB)
  • SSL证书
  • DNS查询费用
  • 负载均衡时长费用
开发环节:
  • 代码评审(增加20-30%开发时长)
  • 文档编写
  • 测试基础设施
  • CI/CD流水线(GitHub Actions: $0.008/分钟)
  • staging环境
运维环节:
  • 监控工具(Datadog: ~$15/主机/月)
  • 错误追踪(Sentry: $26+/月)
  • 日志管理
  • 值班补贴
  • 事故响应工时
第三方服务:
  • 邮件服务(SendGrid: $0.00025-0.001/封)
  • SMS服务(Twilio: $0.0075/条)
  • 视频(编码、流媒体)
  • 地图/地理编码(Google: $7/千次请求)

Cost Optimization Strategies

成本优化策略

Quick Wins

快速见效手段

StrategySavingsEffort
Reserved instances30-60%Low
Right-sizing instances20-40%Medium
Spot instances (non-critical)60-90%Medium
Storage tiering50-80%Low
CDN caching30-50% bandwidthLow
策略节省比例投入工作量
预留实例30-60%
实例规格适配20-40%
竞价实例(非关键业务)60-90%
存储分层50-80%
CDN缓存减少30-50%带宽成本

Architecture Optimizations

架构优化

OptimizationImpactComplexity
Caching (Redis)50-80% DB load reductionMedium
Queue-based processingSmooth traffic spikesMedium
Auto-scalingPay for what you useMedium
Serverless (appropriate use)Variable → zero when idleHigh
Multi-region read replicasReduce cross-region costsHigh

优化手段效果复杂度
缓存(Redis)降低50-80%数据库负载
队列式处理平滑流量峰值
自动扩缩容按实际使用付费
Serverless(适用场景)闲置时成本降为0
多区域读副本降低跨区域成本

Cost Estimation Templates

成本估算模板

Project Budget Template

项目预算模板

markdown
undefined
markdown
undefined

Project: [Name]

项目: [名称]

Duration: [X months]

周期: [X个月]

Development Costs

开发成本

PhaseDurationTeam SizeCost
Discovery/Design2 weeks2$X
MVP Development8 weeks4$X
Testing/QA2 weeks3$X
Deployment1 week2$X
Total Development$X
阶段时长团队规模成本
需求调研/设计2周2$X
MVP开发8周4$X
测试/QA2周3$X
部署上线1周2$X
开发总成本$X

Infrastructure Costs (First Year)

基础设施成本(首年)

ComponentMonthlyAnnual
Compute$X$X
Database$X$X
Storage$X$X
Network$X$X
Third-party APIs$X$X
Monitoring/Tools$X$X
Total Infrastructure$X$X
组件月度成本年度成本
计算资源$X$X
数据库$X$X
存储$X$X
网络$X$X
第三方API$X$X
监控/工具$X$X
基础设施总成本$X$X

Ongoing Costs (Annual)

持续成本(年度)

CategoryCost
Infrastructure$X
Maintenance (20% of dev)$X
Support/On-call$X
Tool licenses$X
Total Annual$X
分类成本
基础设施$X
维护成本(开发成本的20%)$X
支持/值班$X
工具授权$X
年度总成本$X

Summary

汇总

MetricValue
Total First Year$X
Annual Run Rate$X
3-Year TCO$X
Cost per User (at scale)$X
undefined
指标数值
首年总成本$X
年度运行成本$X
3年TCO$X
规模化后每用户成本$X
undefined

Quick Estimate Calculator

快速估算计算器

markdown
undefined
markdown
undefined

Quick Infrastructure Estimate

基础设施快速估算

Inputs:
  • Expected users: [X]
  • Requests per user/day: [Y]
  • Data storage per user: [Z GB]
  • Growth rate: [W%/month]
Calculations:
  • Daily requests: X × Y
  • Monthly requests: Daily × 30
  • Required compute: (Monthly requests / 100K) × $50
  • Storage: X × Z × $0.10
  • Database: (X / 10K) × $200
  • Estimated monthly: Compute + Storage + Database × 1.3
12-month projection with growth: Sum of (Monthly × (1 + W%)^month) for months 1-12

---
输入:
  • 预期用户量: [X]
  • 单用户日请求量: [Y]
  • 单用户数据存储量: [Z GB]
  • 月增长率: [W%]
计算:
  • 日请求量: X × Y
  • 月请求量: 日请求量 × 30
  • 所需计算资源: (月请求量 / 10万) × $50
  • 存储成本: X × Z × $0.10
  • 数据库成本: (X / 1万) × $200
  • 估算月度成本: (计算成本 + 存储成本 + 数据库成本) × 1.3
12个月增长预测: 第1-12月每月成本 × (1 + W%)^月数 求和

---

References

参考资料

  • Cloud Pricing Calculator - Detailed cloud provider comparison
  • Build vs Buy Framework - Extended decision framework
  • 云定价计算器 - 云服务商详细对比
  • 自研vs采购框架 - 扩展决策框架