Software Engineering · Estimation and Scheduling
COCOMO and Effort Estimation
Overview
Effort estimation answers a basic project-management question: how much work, time, and money will a software project need? COCOMO is an algorithmic cost model introduced by Barry Boehm for estimating effort, schedule, and cost from software size.
The lesson also covers size measures such as LOC and function points because COCOMO often starts from one of them.
Before studying it, you should know simple arithmetic, the meaning of person-month, and the difference between source lines of code and user-visible functions.
Key concepts
- Effort is the total labour required, usually in person-months (PM). It is not calendar time.
- Duration is calendar development time in months. Staff is approximately .
- Productivity is output per person-month, e.g. LOC/PM or FP/PM.
- COCOMO stands for COnstructive COst MOdel. It was introduced by Barry W. Boehm in the book Software Engineering Economics in 1981.
- COCOMO is used primarily for software cost estimation, including effort and schedule; it is not a design method or a quality model.
- Basic COCOMO uses only project size in KLOC and one of three development modes: Organic, Semi-detached, or Embedded.
- Organic mode: small project, experienced team, familiar environment, flexible requirements.
- Semi-detached mode: medium size/complexity, mixed experience, some constraints.
- Embedded mode: large, complex project with tight hardware, real-time, or regulatory constraints.
- Intermediate COCOMO adds 15 cost drivers grouped as product, computer, personnel, and project attributes; their product is the Effort Adjustment Factor (EAF).
- Detailed COCOMO is phase-sensitive: it applies cost drivers to individual phases/components to produce phase-wise estimates.
- COCOMO II has stages such as Application Composition, Early Design, and Post-Architecture; it is used for modern software.
- LOC measures physical source code size and depends on programming language. KLOC = LOC/1000.
- Function Points (FP) measure user-visible functional size. Standard FP was originally designed for business information systems; Extended FP adds features for real-time/embedded systems.
- FP analysis counts five components: External Inputs (EI), External Outputs (EO), External Inquiries (EQ), Internal Logical Files (ILF), and External Interface Files (EIF).
- Function point metric is calculated from user requirements, not from source code. It is not a source code metric.
- Function count is independent of programming language; LOC is language-dependent.
- Size-oriented metrics normalize quality or productivity by size, e.g. defects/KLOC. Function-oriented metrics use FP.
- Size and complexity are product metrics; effort, schedule, and cost are project metrics.
- A base estimate in cost estimation is based on historical data from similar completed projects, not on the “base model” of the current project.
- Recorded software attributes support cost/schedule estimates, reliability prediction, and management of the development process.
- VAF or CAF uses 14 value adjustment factors, each rated 0 to 5. Average VAF when every factor is 3 is .
- VAFs include factors such as performance criticality and reusability requirements; they are not LOC, manpower, or hardware cost counts.
How it works
- Estimate the project size. Use LOC directly if known. If FP is given, convert using a language-specific LOC/FP ratio.
- Convert LOC to KLOC by dividing by 1000.
- Select the COCOMO level. For Basic COCOMO, select the development mode.
- Use the mode constants to compute effort: .
- Compute duration from effort: . Do not use KLOC here in Basic COCOMO.
- Compute average staff: .
- Compute cost: , where is salary per person-month. If the whole team salary per month is given, multiply by months.
- For Intermediate COCOMO, multiply effort by EAF: .
Drawing the diagram…
Formulas
- Let = effort in person-months, = duration in months, = staff, = salary per person-month, = productivity.
- Function point formulas:
- Intermediate COCOMO:
-
where are the 15 cost-driver multipliers. Convention: Intermediate COCOMO keeps the same exponent as Basic but uses a different coefficient : Organic 3.2, Semi-detached 3.0, Embedded 2.8 (Basic uses 2.4, 3.0, 3.6).
-
Average function-point weights used in UGC-style numericals:
| Component | Average weight |
|---|---|
| External Inputs EI | 4 |
| External Outputs EO | 5 |
| External Inquiries EQ | 4 |
| Internal Logical Files ILF | 10 |
| External Interface Files EIF | 7 |
Worked examples
Example 1: FP to LOC to Basic COCOMO effort.
A system has 400 function points. Java uses 55 LOC/FP. Basic COCOMO constants are , . Find effort.
LOC = .
KLOC = .
person-months.
Answer: 55 person-months.
Example 2: Basic COCOMO effort and duration.
An organic project has size 25 KLOC. Use . Estimate effort and duration.
PM.
months.
Answer: about 70.5 person-months and 12.6 months.
Example 3: Productivity-based effort, duration, and cost.
A project has 36,000 LOC, productivity 600 LOC/PM, 6 developers, and salary Rs 60,000 per person-month.
PM.
months.
Cost = INR = 36 lakh.
Answer: PM, months, cost = Rs 36 lakh.
Example 4: Function point calculation.
Counts are EI=30, EO=20, EQ=15, ILF=5, EIF=3. All weights are average; all 14 VAF factors are average.
.
Average VAF = .
.
Answer: about 376 function points.
Example 5: Match-the-list style.
Match: A. Product complexity, B. Analyst capability, C. Main storage constraint, D. Required development schedule with categories: product, personnel, computer, project.
A is a product cost driver; B is personnel; C is computer; D is project.
Answer: A-product, B-personnel, C-computer, D-project.
Comparison
| Model level | Inputs used | Main use |
|---|---|---|
| Basic COCOMO | KLOC + development mode | quick early estimate |
| Intermediate COCOMO | KLOC + mode + 15 cost drivers | EAF-adjusted estimate |
| Detailed COCOMO | Intermediate + phase/component detail | phase-wise effort and schedule |
| Mode | Typical project | ||||
|---|---|---|---|---|---|
| Organic | small, familiar, experienced team | 2.4 | 1.05 | 2.5 | 0.38 |
| Semi-detached | medium size, mixed experience | 3.0 | 1.12 | 2.5 | 0.35 |
| Embedded | large, tight constraints, real-time | 3.6 | 1.20 | 2.5 | 0.32 |
| Point | LOC | Function Points |
|---|---|---|
| Basis | implementation lines | user-visible functions |
| Language dependence | yes | no |
| Timing | after design/coding | from requirements |
| Source code metric? | yes | no |
| Typical use | size/effort/cost | size/effort/cost |
| Cost driver category | Examples |
|---|---|
| Product | reliability, database size, product complexity |
| Computer | execution-time constraint, main-storage constraint, turnaround time |
| Personnel | analyst capability, programmer capability, language experience |
| Project | modern programming practices, software tools, required schedule |
Revision summary
- COCOMO = Constructive Cost Model, Barry Boehm, 1981, Software Engineering Economics.
- Basic: , ; duration uses effort, not KLOC.
- Organic: 2.4, 1.05, 2.5, 0.38; Semi-detached: 3.0, 1.12, 2.5, 0.35; Embedded: 3.6, 1.20, 2.5, 0.32.
- FP to LOC uses LOC/FP ratio; then divide LOC by 1000 to get KLOC.
- Intermediate COCOMO adds 15 cost drivers; Detailed is phase-sensitive.
- ; ; there are 14 factors.
- Average FP weights: EI 4, EO 5, EQ 4, ILF 10, EIF 7.
- If all VAF factors are average, VAF = 1.07.
- LOC is language-dependent; FP is language-independent and requirements-based.
- FP is not a source code metric; Halstead, complexity, and length are code metrics.
- Cost = effort × salary per person-month; staff = effort/duration.
- Base estimate uses historical data from similar completed projects.
Previous-year exam insights
- Direct concept questions ask full form, inventor/book, and primary purpose: cost/effort/schedule estimation.
- Numeric Basic COCOMO questions usually give size, mode constants, and ask for effort or duration; convert FP to LOC and LOC to KLOC first.
- Productivity-cost questions test , , and cost = effort × salary.
- Function-point questions use the five average weights and the 14-factor VAF; average VAF is often 1.07.
- Match/statement questions compare Basic, Intermediate, Detailed, and the three development modes.
- Cost-driver matching tests product, computer, personnel, and project categories.
- Traps: forgetting to divide LOC by 1000; using KLOC in the duration equation; using wrong mode constants; treating effort as duration; treating FP as a source-code metric.
- Check units first: LOC vs KLOC, PM vs months, and whether VAF is specified or assumed average.
Practice at PARIKSHA
You are ready for the PARIKSHA tests of this sub-topic when you can:
- State the full form, origin, book, and purpose of COCOMO.
- Distinguish Basic, Intermediate, and Detailed COCOMO.
- Identify Organic, Semi-detached, and Embedded modes from project descriptions.
- Convert FP to LOC and KLOC, then compute Basic COCOMO effort and duration.
- Compute staff and cost from effort, duration, productivity, and salary.
- Calculate UFP, VAF, and FP using standard average weights and 14 factors.
- Explain why FP is language-independent and not a source code metric.
- Match COCOMO cost drivers to product, computer, personnel, and project categories.
- Spot common traps involving KLOC, duration, mode constants, and VAF.
- Solve a two-step numerical that combines FP conversion, COCOMO, and cost.
Attempt the sub-topic test first, then the subject test.