1. Gyanastra
  2. Software Engineering
  3. Estimation and Scheduling
  4. COCOMO and Effort Estimation
Free lesson, no account needed 9 min read 11 practice questions after it
Asked in past papers10 times
  • ISRO20172016
  • UGC NET20182017201620132010200920082006

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 EE is the total labour required, usually in person-months (PM). It is not calendar time.
  • Duration DD is calendar development time in months. Staff NN is approximately E/DE/D.
  • 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 0.65+0.01×42=1.070.65 + 0.01 \times 42 = 1.07.
  • VAFs include factors such as performance criticality and reusability requirements; they are not LOC, manpower, or hardware cost counts.

How it works

  1. Estimate the project size. Use LOC directly if known. If FP is given, convert using a language-specific LOC/FP ratio.
  2. Convert LOC to KLOC by dividing by 1000.
  3. Select the COCOMO level. For Basic COCOMO, select the development mode.
  4. Use the mode constants to compute effort: E=a(KLOC)bE = a(\text{KLOC})^b.
  5. Compute duration from effort: D=cEdD = cE^d. Do not use KLOC here in Basic COCOMO.
  6. Compute average staff: N=E/DN = E/D.
  7. Compute cost: Cost=E×S\text{Cost} = E \times S, where SS is salary per person-month. If the whole team salary per month is given, multiply by months.
  8. For Intermediate COCOMO, multiply effort by EAF: E=a(KLOC)b×EAFE = a(\text{KLOC})^b \times EAF.
Figure. It lists the sequence: count LOC or FP, convert FP to LOC, convert to KLOC, choose a Basic COCOMO mode and constants, then compute effort, duration, average staff, and cost.

Formulas

  • Let EE = effort in person-months, DD = duration in months, NN = staff, SS = salary per person-month, PP = productivity.

KLOC=LOC1000\text{KLOC} = \frac{\text{LOC}}{1000}

E=a(KLOC)bE = a(\text{KLOC})^b

D=cEdD = cE^d

N=EDN = \frac{E}{D}

Cost=E×S\text{Cost} = E \times S

E=LOCPLOCorE=FPPFPE = \frac{\text{LOC}}{P_{\text{LOC}}} \quad \text{or} \quad E = \frac{\text{FP}}{P_{\text{FP}}}

  • Function point formulas:

UFP=∑i(counti×weighti)UFP = \sum_i (\text{count}_i \times \text{weight}_i)

VAF=CAF=0.65+0.01∑i=114FiVAF = CAF = 0.65 + 0.01\sum_{i=1}^{14} F_i

FP=UFP×VAFFP = UFP \times VAF

  • Intermediate COCOMO:

E=a(KLOC)b×EAFE = a(\text{KLOC})^b \times EAF

EAF=∏i=115MiEAF = \prod_{i=1}^{15} M_i

  • where MiM_i are the 15 cost-driver multipliers. Convention: Intermediate COCOMO keeps the same exponent bb as Basic but uses a different coefficient aa: 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:

ComponentAverage weight
External Inputs EI4
External Outputs EO5
External Inquiries EQ4
Internal Logical Files ILF10
External Interface Files EIF7

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 a=2.5a=2.5, b=1.0b=1.0. Find effort.
LOC = 400×55=22,000400 \times 55 = 22{,}000.
KLOC = 22,000/1000=2222{,}000/1000 = 22.
E=2.5×221.0=55E = 2.5 \times 22^{1.0} = 55 person-months.
Answer: 55 person-months.

Example 2: Basic COCOMO effort and duration.
An organic project has size 25 KLOC. Use a=2.4,b=1.05,c=2.5,d=0.38a=2.4,b=1.05,c=2.5,d=0.38. Estimate effort and duration.
E=2.4×251.05≈2.4×29.36≈70.5E = 2.4 \times 25^{1.05} \approx 2.4 \times 29.36 \approx 70.5 PM.
D=2.5×(70.5)0.38≈2.5×5.04≈12.6D = 2.5 \times (70.5)^{0.38} \approx 2.5 \times 5.04 \approx 12.6 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.
E=36,000/600=60E = 36{,}000/600 = 60 PM.
D=E/N=60/6=10D = E/N = 60/6 = 10 months.
Cost = 60×60,000=36,00,00060 \times 60{,}000 = 36{,}00{,}000 INR = 36 lakh.
Answer: E=60E=60 PM, D=10D=10 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.
UFP=30(4)+20(5)+15(4)+5(10)+3(7)=120+100+60+50+21=351UFP = 30(4)+20(5)+15(4)+5(10)+3(7) = 120+100+60+50+21 = 351.
Average VAF = 0.65+0.01(14×3)=1.070.65+0.01(14 \times 3)=1.07.
FP=351×1.07=375.57≈376FP = 351 \times 1.07 = 375.57 \approx 376.
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 levelInputs usedMain use
Basic COCOMOKLOC + development modequick early estimate
Intermediate COCOMOKLOC + mode + 15 cost driversEAF-adjusted estimate
Detailed COCOMOIntermediate + phase/component detailphase-wise effort and schedule
ModeTypical projectaabbccdd
Organicsmall, familiar, experienced team2.41.052.50.38
Semi-detachedmedium size, mixed experience3.01.122.50.35
Embeddedlarge, tight constraints, real-time3.61.202.50.32
PointLOCFunction Points
Basisimplementation linesuser-visible functions
Language dependenceyesno
Timingafter design/codingfrom requirements
Source code metric?yesno
Typical usesize/effort/costsize/effort/cost
Cost driver categoryExamples
Productreliability, database size, product complexity
Computerexecution-time constraint, main-storage constraint, turnaround time
Personnelanalyst capability, programmer capability, language experience
Projectmodern programming practices, software tools, required schedule

Revision summary

  • COCOMO = Constructive Cost Model, Barry Boehm, 1981, Software Engineering Economics.
  • Basic: E=a(KLOC)bE=a(\text{KLOC})^b, D=cEdD=cE^d; 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.
  • FP=UFP×VAFFP=UFP \times VAF; VAF=0.65+0.01∑FiVAF=0.65+0.01\sum F_i; 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 E=LOC/PE=\text{LOC}/P, D=E/ND=E/N, 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.

Pages 1–2 of 2