# SOFTWARE COST ESTIMATION
I. CÁC PHƯƠNG PHÁP LUẬN CƠ BẢN
- Algorithmic Models (Mô hình thuật toán)
-
COCOMO (Constructive Cost Model)
- Basic COCOMO
- Intermediate COCOMO
- Detailed COCOMO
- COCOMO II (phiên bản hiện đại)
-
Function Point Analysis (FPA)
-
Use Case Points (UCP)
-
SLIM Model
-
Putnam Model
- Expert Judgment (Đánh giá chuyên gia)
- Delphi Technique
- Work Breakdown Structure (WBS)
- Planning Poker (Agile)
- Analogy-Based Estimation
- So sánh với dự án tương tự
- Case-Based Reasoning
- Parametric Models
- Dựa trên các tham số lịch sử
- Phân tích hồi quy
II. CÁC PHƯƠNG PHÁP THỰC TẾ ĐANG ÁP DỤNG
- Agile Estimation
Story Points
- Fibonacci sequence: 1, 2, 3, 5, 8, 13, 21...
- T-shirt sizing: XS, S, M, L, XL
- Relative estimation
Planning Poker
- Team-based estimation
- Consensus building
- Velocity tracking
Bucket System
- Nhanh hơn Planning Poker
- Phù hợp với backlog lớn
- Three-Point Estimation
Công thức PERT:
Expected Time = (Optimistic + 4×Most Likely + Pessimistic) / 6
Ví dụ:
- Optimistic: 10 ngày
- Most Likely: 15 ngày
- Pessimistic: 26 ngày
Expected = (10 + 4×15 + 26) / 6 = 16 ngày
- Bottom-Up Estimation
- Ước lượng từng task nhỏ
- Tổng hợp lên cao
- Chi tiết và chính xác
- Top-Down Estimation
- Bắt đầu từ tổng quan
- Phân rã xuống chi tiết
- Nhanh nhưng ít chính xác hơn
- T-Shirt Sizing
XS: < 1 ngày
S: 1-3 ngày
M: 3-5 ngày
L: 5-10 ngày
XL: > 10 ngày
III. CÔNG CỤ/PHẦN MỀM ƯỚC LƯỢNG
- Project Management Tools
Jira Software
- Story points estimation
- Velocity charts
- Burndown/Burnup charts
- Sprint planning tools
Azure DevOps
- Capacity planning
- Velocity tracking
- Work item estimation
Microsoft Project
- Gantt charts
- Resource allocation
- Critical path analysis
- Estimation-Specific Tools
COCOMO Calculator
- Constructive Cost Model
- Effort/Duration estimation
- Team size calculation
Function Point Workbench
- Function Point Analysis
- Automated counting
Estimate Professional
- Multiple estimation methods
- Risk analysis
- Agile Planning Tools
Planning Poker Online
- PlanningPoker.com
- Scrum Poker Online
- Pointing Poker
Miro/Mural
- Virtual estimation sessions
- Collaborative planning
- Spreadsheet Templates
Excel/Google Sheets
Ví dụ template:
┌─────────────┬──────────┬──────────┬──────────┬──────────┐
│ Task │ Best Case│ Expected │ Worst │ PERT Est │
├─────────────┼──────────┼──────────┼──────────┼──────────┤
│ Design DB │ 3 days │ 5 days │ 8 days │ 5.2 days │
│ API Dev │ 5 days │ 8 days │ 15 days │ 8.7 days │
│ Testing │ 2 days │ 4 days │ 7 days │ 4.2 days │
└─────────────┴──────────┴──────────┴──────────┴──────────┘
- AI-Powered Tools
Software Analytics Platforms
- Linear B
- Code Climate Velocity
- Waydev
Machine Learning Models
- Dựa trên dữ liệu lịch sử
- Predictive analytics
IV. PHƯƠNG PHÁP ƯỚC LƯỢNG THEO QUY MÔ
- Startup/Small Projects
- Story Points + Planning Poker
- T-shirt sizing
- Expert judgment
- Medium Projects
- Function Points
- Use Case Points
- Three-point estimation
- Jira/Azure DevOps
- Large Enterprise Projects
- COCOMO II
- Parametric models
- Hybrid approaches
- MS Project + custom tools
V. BEST PRACTICES
- Kết hợp nhiều phương pháp
Ví dụ:
1. Expert judgment (ban đầu)
2. Planning Poker (chi tiết)
3. Three-point estimation (rủi ro)
4. Historical data (hiệu chỉnh)
- Continuous Refinement
- Re-estimate định kỳ
- Track actual vs estimated
- Improve accuracy theo thời gian
- Buffer Management
Contingency Reserve: 10-20% cho rủi ro đã biết
Management Reserve: 5-10% cho rủi ro không biết
- Documentation
- Ghi lại assumptions
- Track estimation accuracy
- Lessons learned
VI. XU HƯỚNG HIỆN NAY
- Data-Driven Estimation
- Sử dụng dữ liệu lịch sử
- Machine learning predictions
- Continuous Estimation
- Real-time adjustments
- Automated tracking
- Evidence-Based Scheduling
- Monte Carlo simulations
- Probabilistic forecasting
- DevOps Metrics
- Lead time
- Cycle time
- Deployment frequency
Khuyến nghị thực tế:
- Agile teams: Story Points + Planning Poker + Jira
- Traditional PM: WBS + Three-point + MS Project
- Hybrid: Kết hợp COCOMO II + Agile estimation
- Startups: T-shirt sizing + Excel templates
Bài toán thực tế:
Yêu cầu từ phía khách hàng và tất cả yêu cầu đang là high level, một số buổi thảo luận và làm rõ yêu cầu nhưng không nhiều thời gian để có thể phân tích chi tiết. KH yêu cầu gửi một báo giá cho khách hàng về nhân sự, thời gian dựa trên yêu cầu high level của khách hàng.
B # PHƯƠNG PHÁP ƯỚC LƯỢNG CHO YÊU CẦU HIGH-LEVEL
I. PHƯƠNG PHÁP ĐỀ XUẤT
Recommended Approach: HYBRID METHOD
┌─────────────────────────────────────────────────────┐
│ ANALOGOUS + EPIC-LEVEL + THREE-POINT + BUFFER │
└─────────────────────────────────────────────────────┘
II. QUY TRÌNH ƯỚC LƯỢNG 5 BƯỚC
BƯỚC 1: Epic-Level Breakdown (2-4 giờ)
High-Level Requirements
↓
Epic Level Features
↓
Major Components
Template phân tích:
PROJECT: [Tên dự án] DURATION: [Estimate] months
EPIC BREAKDOWN
- USER MANAGEMENT
- Authentication & Authorization
- User Profile Management
- Role & Permission - CORE FUNCTIONALITY
- [Feature A]
- [Feature B]
- [Feature C]
3. INTEGRATION - Third-party APIs
- Payment Gateway
- Email/SMS Service
- ADMIN PANEL
- Dashboard & Reports
- Configuration
- INFRASTRUCTURE
- Database Design
- DevOps Setup
- Security Implementation
BƯỚC 2: T-Shirt Sizing với Reference (1-2 giờ)
Sử dụng dự án tương tự làm benchmark:
SIZE DEFINITION (Based on similar projects):
XS (Extra Small): 1-2 man-weeks
Example: Simple CRUD module, Basic form
S (Small): 2-4 man-weeks
Example: User authentication, Basic reporting
M (Medium): 1-2 man-months
Example: Complex module with workflow, Integration API
L (Large): 2-4 man-months
Example: Core business logic, Advanced dashboard
XL (Extra Large): 4-6 man-months
Example: Complete subsystem, Complex integration
Apply to Epics:
┌─────────────────────────────┬──────┬─────────────┐
│ Epic/Component │ Size │ Effort │
├─────────────────────────────┼──────┼─────────────┤
│ User Management │ M │ 1.5 months │
│ Core Feature A │ L │ 3 months │
│ Core Feature B │ M │ 2 months │
│ Integration Module │ L │ 3 months │
│ Admin Panel │ M │ 1.5 months │
│ Reporting System │ M │ 2 months │
│ Infrastructure & DevOps │ S │ 1 month │
├─────────────────────────────┼──────┼─────────────┤
│ SUBTOTAL │ │ 14 months │
└─────────────────────────────┴──────┴─────────────┘
BƯỚC 3: Three-Point Estimation (1 giờ)
Áp dụng PERT cho mỗi Epic:
Formula: Expected = (Optimistic + 4×Most_Likely + Pessimistic) / 6
Example cho "Core Feature A":
┌──────────────────┬─────────────┐
│ Optimistic │ 2 months │
│ Most Likely │ 3 months │
│ Pessimistic │ 5 months │
├──────────────────┼─────────────┤
│ PERT Estimate │ 3.2 months │
│ Standard Dev │ 0.5 months │
└──────────────────┴─────────────┘
Complete Estimation Table:
┌─────────────────────┬──────┬────────┬────────┬──────────┬────────┐
│ Epic │ Opt │ Likely │ Pess │ PERT Est │ StdDev │
├─────────────────────┼──────┼────────┼────────┼──────────┼────────┤
│ User Management │ 1.0 │ 1.5 │ 2.5 │ 1.6 │ 0.25 │
│ Core Feature A │ 2.0 │ 3.0 │ 5.0 │ 3.2 │ 0.50 │
│ Core Feature B │ 1.5 │ 2.0 │ 3.5 │ 2.2 │ 0.33 │
│ Integration │ 2.0 │ 3.0 │ 5.0 │ 3.2 │ 0.50 │
│ Admin Panel │ 1.0 │ 1.5 │ 2.5 │ 1.6 │ 0.25 │
│ Reporting │ 1.5 │ 2.0 │ 3.0 │ 2.1 │ 0.25 │
│ Infrastructure │ 0.5 │ 1.0 │ 2.0 │ 1.1 │ 0.25 │
├─────────────────────┼──────┼────────┼────────┼──────────┼────────┤
│ TOTAL (Development) │ │ │ │ 15 months│ │
└─────────────────────┴──────┴────────┴────────┴──────────┴────────┘
BƯỚC 4: Add Contingency & Other Activities
┌────────────────────────────────────┬──────────┬────────┐
│ Activity │ Effort │ % Base │
├────────────────────────────────────┼──────────┼────────┤
│ Development (from PERT) │ 15.0 mon │ 100% │
├────────────────────────────────────┼──────────┼────────┤
│ + Project Management │ 1.5 mon │ 10% │
│ + Business Analysis/Clarification │ 2.0 mon │ 13% │
│ + Testing & QA │ 3.0 mon │ 20% │
│ + UAT Support │ 1.0 mon │ 7% │
│ + Documentation │ 0.8 mon │ 5% │
│ + Deployment & Training │ 0.5 mon │ 3% │
├────────────────────────────────────┼──────────┼────────┤
│ SUBTOTAL │ 23.8 mon │ │
├────────────────────────────────────┼──────────┼────────┤
│ + Contingency Reserve (15%) │ 3.6 mon │ 15% │
│ + Management Reserve (10%) │ 2.4 mon │ 10% │
├────────────────────────────────────┼──────────┼────────┤
│ TOTAL EFFORT │ 29.8 mon │ │
└────────────────────────────────────┴──────────┴────────┘
BƯỚC 5: Resource Planning & Pricing
Team Composition:
Giả định triển khai 8 tháng và phân bổ FTE theo từng tháng. FTE tháng cao nhất là 6.7 FTE
Overlap & Coordination (≈15-20%).
Khi nhiều người làm việc song song:
- Daily standups
- Code reviews
- Integration meetings
- Knowledge sharing
- Coordination overhead Example: Pure coding: 10 man-months With 3 people: 4 months × 3 = 12 man-months (+20%)
Ramp-up Time (≈10%) New team members cần thời gian:
- Onboarding
- Code base familiarization
- Domain knowledge transfer
- Tool setup
Each person: 1-2 weeks không productive 2 Sr.Dev + 2 Mid.Dev = 4 people × 1.5 weeks = 6 weeks ≈ 3 man-months overhead
Mức an toàn , dự phòng: 8FTE
┌─────────────────────┬─────────┬──────────┬──────────┐
│ Role │ Members │ Duration │ Effort │
├─────────────────────┼─────────┼──────────┼──────────┤
│ Project Manager │ 0.5 │ 8 months │ 4 months │
│ Business Analyst │ 1 │ 6 months │ 6 months │
│ Tech Lead/Architect │ 1 │ 8 months │ 8 months │
│ Senior Developer │ 2 │ 7 months │ 14 month │
│ Middle Developer │ 2 │ 6 months │ 12 month │
│ QA Engineer │ 1 │ 5 months │ 5 months │
│ DevOps Engineer │ 0.5 │ 4 months │ 2 months │
├─────────────────────┼─────────┼──────────┼──────────┤
│ TOTAL │ 8 FTE │ 8 months │ 51 m-mon │
└─────────────────────┴─────────┴──────────┴──────────┘
Note: 51 man-months / 8 months = ~6.4 average team size
Tổng effort cao hơn 29.8 do overlap và ramp-up
III. TEMPLATE BÁO GIÁ CHO KHÁCH HÀNG
Option A: Fixed Price with Range
PROPOSAL SUMMARY
================
Project Duration: 7-9 months
Team Size: 6-8 members
PRICING OPTIONS:
Option 1: FIXED PRICE
┌──────────────────────────────────────────────────┐
│ Total Project Cost: $XXX,XXX - $XXX,XXX │
│ │
│ Payment Milestones: │
│ - Contract signing (20%): $XX,XXX │
│ - Design approval (15%): $XX,XXX │
│ - Development Phase 1 (25%): $XX,XXX │
│ - Development Phase 2 (25%): $XX,XXX │
│ - UAT & Go-live (15%): $XX,XXX │
└──────────────────────────────────────────────────┘
Scope: Based on agreed Epic-level requirements
Out of Scope: [List clearly]
Change Requests: Handled separately after formal CR process
Option B: Time & Material with Cap
Option 2: TIME & MATERIAL (with ceiling)
┌──────────────────────────────────────────────────┐
│ Rate Card: │
│ - Project Manager: $XX/hour │
│ - Tech Lead: $XX/hour │
│ - Senior Developer: $XX/hour │
│ - Middle Developer: $XX/hour │
│ - QA Engineer: $XX/hour │
│ │
│ Estimated Range: $XXX,XXX - $XXX,XXX │
│ Not-to-Exceed Cap: $XXX,XXX │
│ │
│ Billing: Monthly based on actual hours │
└──────────────────────────────────────────────────┘
Option C: Phased Approach (RECOMMENDED)
Option 3: PHASED DELIVERY ⭐ RECOMMENDED
┌──────────────────────────────────────────────────┐
│ PHASE 1: Discovery & Design (Fixed) │
│ Duration: 4-6 weeks │
│ Cost: $XX,XXX │
│ Deliverables: │
│ - Detailed Requirements Document │
│ - System Architecture │
│ - UI/UX Design │
│ - Detailed Project Plan & Estimate │
│ │
│ PHASE 2: Development (T&M with cap) │
│ Duration: 5-7 months │
│ Estimated Cost: $XXX,XXX - $XXX,XXX │
│ Based on Phase 1 detailed estimate │
│ │
│ TOTAL INVESTMENT: $XXX,XXX - $XXX,XXX │
└──────────────────────────────────────────────────┘
Benefits:
✓ Reduced risk for both parties
✓ More accurate Phase 2 estimate
✓ Flexibility to adjust scope
✓ Early exit option after Phase 1
IV. ASSUMPTIONS & RISKS DOCUMENT
Bắt buộc kèm theo báo giá:
ASSUMPTIONS
===========
- Requirements are based on initial discussions dated [DATE]
- Technical stack: [List technologies]
- Team availability: Start date [DATE]
- Client provides timely feedback (within 2 business days)
- Access to necessary systems/data provided by client
- Third-party services are available and accessible
- No major scope changes during development
EXCLUSIONS
==========
- Mobile applications (Web only)
- Integration with System X (unless API documented)
- Data migration from legacy system
- Post-launch maintenance (separate contract)
- Training (more than 2 sessions)
RISKS & MITIGATION
==================
| Risk | Impact | Mitigation |
|---|---|---|
| Unclear requirements | High | Phase 1 Discovery |
| Third-party API issues | Medium | Early integration |
| esource availability | Medium | Backup team ready |
| Scope creep | High | ormal CR process |
DEPENDENCIES
============
- Client to provide: [List]
- Sign-off timeline: [Timeline]
- Environment access: [Timeline]
## V. CÔNG CỤ HỖ TRỢ NHANH
### **Quick Estimation Spreadsheet Template**
Sheet 1: Epic Breakdown
┌─────┬──────────────┬──────┬─────┬────────┬──────┬──────────┐
│ ID │ Epic │ Size │ Opt │ Likely │ Pess │ PERT Est │
├─────┼──────────────┼──────┼─────┼────────┼──────┼──────────┤
│ E1 │ [Epic Name] │ M │ 1 │ 1.5 │ 2.5 │ 1.6 │
│ E2 │ [Epic Name] │ L │ 2 │ 3 │ 5 │ 3.2 │
└─────┴──────────────┴──────┴─────┴────────┴──────┴──────────┘
Sheet 2: Resource Planning
┌──────────────┬─────┬──────────┬────────┬──────┐
│ Role │ Qty │ Duration │ Rate │ Cost │
├──────────────┼─────┼──────────┼────────┼──────┤
│ [Role] │ 2 │ 6 months │ $X,XXX │ $XXX │
└──────────────┴─────┴──────────┴────────┴──────┘
Sheet 3: Pricing Calculator
- Auto-calculate totals
- Apply contingency
- Generate price ranges
One-Page Estimator (For Quick Reference)
QUICK ESTIMATION CHECKLIST
□ List all major features (Epic level)
□ Compare with similar past projects
□ Apply T-shirt sizing
□ Calculate PERT estimates
□ Add standard activities (PM, QA, BA)
□ Add 15-25% contingency
□ Define team composition
□ Calculate duration (effort/team size)
□ Add 10-20% for unknowns
□ Create 3 pricing options
□ Document assumptions
□ List exclusions clearly
□ Identify key risks
SANITY CHECK:
□ Does timeline make sense?
□ Is team size realistic?
□ Compared with industry benchmarks?
□ Buffer adequate for unknowns?
VI. BENCHMARKS THAM KHẢO
TYPICAL PROJECT RATIOS:
=======================
Development: 50-60% of total effort
Testing: 15-20%
Project Management: 8-12%
Business Analysis: 10-15%
Documentation: 3-5%
Deployment: 2-5%
TEAM PRODUCTIVITY:
Developer output: 5-10 function points/month
or 100-200 LOC/day (quality code)
CONTINGENCY:
Known risks: 10-15%
Unknown risks: 10-15%
High uncertainty: 20-30%
VII. LỜI KHUYÊN
✅ DO's:
- Always provide a range, không báo giá số tròn duy nhất
- Recommend phased approach - giảm rủi ro cho cả 2 bên
- Document everything - assumptions, exclusions, dependencies
- Include buffer - 25-35% tổng cho high-level requirements
- Reference past projects - tăng độ tin cậy
- Clarify change process - tránh scope creep
❌ DON'Ts:
- Không commit fixed price khi yêu cầu quá mơ hồ
- Không quên các hidden tasks (meetings, setup, deployment)
- Không low-ball để win deal - sẽ thua lỗ sau
- Không ignore risks và dependencies
- Không estimate một mình - cần input từ tech team
🎯 Best Practices:
1. Quick Workshop (4 hours):
- Gather key stakeholders
- Epic breakdown session
- T-shirt sizing
- Risk identification
2. Use Templates:
- Standardized estimation sheet
- Proposal template
- Assumption checklist
3. Validate:
- Check với tech lead
- Compare với past projects
- Sanity check timeline
- Review với senior PM
4. Present Options:
- Option A: Conservative (higher price, lower risk)
- Option B: Aggressive (lower price, higher risk)
- Option C: Phased (recommended)
VIII. EMAIL MẪU GỬI KHÁCH HÀNG
Subject: Proposal - [Project Name] Estimation
Dear [Client Name],
Thank you for the opportunity to propose on [Project Name].
Based on our discussions and the high-level requirements
provided, please find attached our proposal with following
options:
RECOMMENDED APPROACH: Phased Delivery
- Phase 1 (Discovery): 4-6 weeks, $XX,XXX (Fixed)
- Phase 2 (Development): 5-7 months, $XXX,XXX-$XXX,XXX
This approach allows us to:
✓ Provide detailed requirements and accurate estimate
✓ Reduce risks for both parties
✓ Ensure alignment before major investment
ALTERNATIVE: Fixed Price
- Total: $XXX,XXX - $XXX,XXX
- Timeline: 7-9 months
- Based on assumptions documented
Key Points:
• Estimates based on current understanding
• Subject to detailed analysis in Phase 1
• Includes 20% contingency for unknowns
• Excludes [list major exclusions]
Next Steps:
1. Review proposal and assumptions
2. Schedule call to discuss questions
3. Refine scope if needed
4. Proceed with Phase 1 or sign-off
I'm available [dates/times] to discuss.
Best regards,
[Your Name]
Tổng kết: Trình tự:
- ⏱️ 2-4 giờ: Epic breakdown + T-shirt sizing
- ⏱️ 1-2 giờ: Three-point estimation
- ⏱️ 1 giờ: Resource planning + pricing
- ⏱️ 1 giờ: Document assumptions + create proposal
Total: 5-8 giờ để có một báo giá chuyên nghiệp và có căn cứ.
All rights reserved