COCOMO and estimation techniques
COCOMO and other software estimation techniques: principles, formulas, examples (COCOMO 81 basics, Function Points, expert/analogy methods), with exam-style worked problems and common mistakes.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Estimating effort, time and staff is essential in project planning so managers can prepare schedules, budgets and contracts. Engineers use COCOMO and other techniques during project planning, bidding, and feasibility studies to convert size and complexity into person-months and calendar time.
Key ideas
Effort: the labour measured in person-months (one person working full-time for one month). In planning we predict effort then derive schedule and staff.
COCOMO (COnstructive COst MOdel): an empirical model that predicts effort from software size and project attributes. It assumes effort follows a power law of size: Effort = a · (Size)^b. Constants a and b are derived from historical project data. There are flavors: COCOMO 81 (basic, intermediate, detailed) and COCOMO II (modernized with more factors). In exam answers you must state which variant you use.
In COCOMO Basic the model is: Effort = a · (KLOC)^b. The model assumes a single formula per project class (organic, semidetached, embedded). The model abstracts all influence of environment into the exponent b and multiplier a. Typical COCOMO 81 Basic mode constants: Organic (a=2.4, b=1.05), Semidetached (a=3.0, b=1.12), Embedded (a=3.6, b=1.20).
COCOMO Intermediate augments Basic by multiplying by product of effort multipliers (EM) taken from cost drivers (e.g., product complexity, personnel capability, etc.). Then Effort = a · (KLOC)^b · Π(EM_i). Each EM > 0; EM > 1 increases effort, EM < 1 reduces it. COCOMO 81 Intermediate uses 15 cost drivers; the product of EMs is the Effort Adjustment Factor (EAF), typically ranging roughly 0.7–1.6 on historical data.
Schedule (development time) in COCOMO 81 is often derived from effort as another power law: TDEV = c · (Effort)^d. This reflects that adding people does not reduce time linearly (communication overhead).
Function Point (FP): a language- and technology-independent size measure. Steps: count five component types — Internal Logical Files (ILF), External Interface Files (EIF), External Inputs (EI), External Outputs (EO), External Inquiries (EQ) — apply complexity weights to get Unadjusted Function Points (UFP), compute Value Adjustment Factor (VAF) from the 14 General System Characteristics (GSC) producing the Total Degree of Influence (TDI) and get FP = UFP · (0.65 + 0.01·TDI). FP can be converted to LOC by multiplying by a language-dependent LOC/FP factor.
Other estimation techniques: Expert judgment (experienced engineers estimate), Analogy (compare with past projects), Delphi (anonymous expert rounds and aggregation), Top-down (overall estimate split), Bottom-up (estimate work packages and sum), and Wideband Delphi (structured group estimating). Each technique has trade-offs: expert methods are fast but subjective; bottom-up is accurate but time-consuming.
Assumptions and limitations: COCOMO and FP rely on good historical calibration, consistent counting rules, and stable technology. Treat any numeric estimate as a point estimate with uncertainty (use ranges or confidence intervals in real planning).
To draw for an exam: draw a log-log plot with log(KLOC) on X and log(Effort) on Y; draw three roughly parallel lines labelled Organic (lowest a,b), Semidetached (middle), Embedded (highest) showing Effort rising faster than linearly if b>1. They are not exactly parallel; the slope equals b and increases from organic to embedded. Also sketch decomposition of a project into work packages (WBS) to illustrate bottom-up estimation.
Formulas
Effort = a · (KLOC)^b — Effort in person-months; KLOC = thousands of delivered source lines of code; a,b are model constants (dimensionless). Applies to COCOMO Basic/Intermediate.
Effort_intermediate = a · (KLOC)^b · Π(EM_i) — same units; EM_i are effort multipliers (dimensionless) from cost drivers. Use in COCOMO Intermediate.
TDEV = c · (Effort)^d — TDEV is calendar time in months; c,d are schedule constants (dimensionless). Use to convert effort to development schedule. In COCOMO 81 Basic, c = 2.5 and d equals 0.38 (organic), 0.35 (semidetached), or 0.32 (embedded).
Team size ≈ Effort / TDEV — persons (average staffing). Person-months / months = persons.
FP = UFP · (0.65 + 0.01·TDI) — FP is function points (dimensionless); UFP is Unadjusted FP; TDI is the total degree of influence (sum of 14 General System Characteristics rated 0–5 each; range 0–70), so VAF ranges 0.65–1.35. Apply in FP counting.
LOC = FP · (LOC per FP) — LOC per FP is language-dependent (lines / function point), units: lines of code. Convert FP into LOC, then KLOC = LOC / 1000.
Notes: person-month is not universal productivity; do not confuse with cost (salary per month needed to convert to currency).
Worked examples
Example 1 — COCOMO Basic (semidetached) numerical Given: estimated delivered size = 50 KLOC, project class = semidetached. Use COCOMO 81 basic constants for semidetached: a = 3.0, b = 1.12. Use schedule constants c = 2.5, d = 0.35. Steps:
- Formula:
Effort = a · (KLOC)^b. - Compute:
Effort = 3.0 · (50)^1.12.- ln(50) = 3.912023; 1.12·ln(50) = 4.381467; exp(4.381467) = 79.94
- Effort = 3.0 · 79.94 = 239.82 person-months.
- Schedule:
TDEV = 2.5 · (Effort)^0.35.- ln(239.82)=5.4765; 0.35·ln(239.82)=1.9168; exp(1.9168)=6.80
- TDEV = 2.5 · 6.80 = 17.00 months.
- Average team size ≈ Effort / TDEV = 239.82 / 17.00 = 14.11 ≈ 14 persons. Final answers: Effort = 239.8 person-months, Schedule = 17.00 months, Team ≈ 14 people.
Example 2 — Function Point -> LOC -> COCOMO Basic (organic) Given: UFP = 200 (after applying component weights), TDI = 30. Choose LOC/FP for Java = 53 (language factor). Use organic COCOMO constants: a = 2.4, b = 1.05. Use schedule constants c = 2.5, d = 0.38. Steps:
FP = UFP · (0.65 + 0.01·TDI) = 200 · (0.65 + 0.30) = 200 · 0.95 = 190 FP.LOC = FP · (LOC/FP) = 190 · 53 = 10070 LOC→KLOC = 10.07.- Effort:
Effort = 2.4 · (10.07)^1.05.- ln(10.07)=2.309; 1.05·ln(10.07)=2.4246; exp(...) = 11.299
- Effort = 2.4 · 11.299 = 27.118 person-months.
- Schedule:
TDEV = 2.5 · (27.118)^0.38.- ln(27.118)=3.3008; 0.38·...=1.2543; exp(...) = 3.505
- TDEV = 2.5 · 3.505 = 8.762 months.
- Team ≈ 27.118 / 8.762 = 3.10 ≈ 3 persons. Final answers: Effort = 27.12 person-months, Schedule = 8.76 months, Team ≈ 3 people.
Example 3 — Short method comparison (qualitative model answer) Question: Compare Analogy and Bottom-up estimation and when to use each. Model answer (concise): Analogy uses historical projects similar in scope and is fast but depends on finding a close analogue and on consistent counting; useful early or for rough budgets. Bottom-up estimates each work package and sums; it is more accurate but time-consuming and needs a clear WBS; use when detailed planning starts. Always state assumptions and provide a confidence range.
Common mistakes
- Rounding too early in numeric steps (carry precision until final result).
- Treating person-month as interchangeable with calendar months (don’t confuse effort and schedule).
- Using COCOMO constants without stating which COCOMO version or project class.
- Counting FP or LOC inconsistently (wrong ILF/EIF classification or including comments/blank lines in LOC without saying so).
For your exam
Types of questions you will get: definitions (define COCOMO, FP, KLOC), short notes (compare estimation techniques), derivations (show why power-law form is used and how to linearize for regression), numericals (compute effort, schedule, team size from KLOC or FP), and small design tasks (draw log-log plot of effort vs size). A full-marks numerical answer must: state model/version and constants used, show each formula, show intermediate arithmetic steps with units, and give final answers with units and sensible rounding.
Quick check
- What unit is used for effort in COCOMO outputs?
- State the COCOMO basic formula for effort.
- How do you convert UFP to FP (write the formula)?
Answers: 1) person-months. 2)
Effort = a · (KLOC)^b. 3)FP = UFP · (0.65 + 0.01·TDI).
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?