SE Notes
Key formulas and calculations used in software engineering.
Software engineering relies on quantitative formulas for estimation, measurement, and quality assessment. These formulas transform subjective judgments into objective calculations, enabling data-driven decisions about project planning, quality targets, and process improvement. Understanding these formulas is essential for project managers estimating effort, quality engineers measuring effectiveness, and developers understanding the metrics by which their work is assessed.
Effort Estimation Formulas
Basic COCOMO (Constructive Cost Model)
Developed by Barry Boehm, COCOMO estimates development effort based on estimated lines of code:
Where KLOC = thousands of lines of code, and constants depend on project type:
| Project Type | a | b | c | d |
|---|---|---|---|---|
| Organic (small, experienced team) | 2.4 | 1.05 | 2.5 | 0.38 |
| Semi-detached (medium complexity) | 3.0 | 1.12 | 2.5 | 0.35 |
| Embedded (complex, constrained) | 3.6 | 1.20 | 2.5 | 0.32 |
Example: A semi-detached project estimated at 50 KLOC:
Function Point Analysis
Function Points measure system size by counting functional elements:
Where Fi are 14 General System Characteristics rated 0-5, and weights depend on complexity:
| Element | Simple | Average | Complex |
|---|---|---|---|
| External Inputs | 3 | 4 | 6 |
| External Outputs | 4 | 5 | 7 |
| External Inquiries | 3 | 4 | 6 |
| Internal Logical Files | 7 | 10 | 15 |
| External Interface Files | 5 | 7 | 10 |
Quality Metrics Formulas
Defect Density
Defect Removal Efficiency (DRE)
Mean Time Between Failures (MTBF)
Mean Time To Repair (MTTR)
System Availability
Nines of Availability
| Availability | Downtime/Year | Common Name |
|---|---|---|
| 99% | 3.65 days | Two nines |
| 99.9% | 8.76 hours | Three nines |
| 99.99% | 52.6 minutes | Four nines |
| 99.999% | 5.26 minutes | Five nines |
Complexity Metrics
Cyclomatic Complexity (McCabe)
Halstead Metrics
| Program Length | N = N1 + N2 (total operators + total operands) |
| Program Vocabulary | n = n1 + n2 (unique operators + unique operands) |
| Volume | V = N × log2(n) |
| Difficulty | D = (n1/2) × (N2/n2) |
| Effort | E = D × V |
Project Scheduling Formulas
Critical Path Method
PERT Estimation
Test Coverage Formulas
Productivity Metrics
These formulas provide the quantitative foundation for software engineering management—enabling objective estimation, measurement, and improvement of software development processes and products.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Software Engineering Formulas.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Software Engineering topic.
Search Terms
software-engineering, software engineering, software, engineering, resources, formulas, software engineering formulas
Related Software Engineering Topics