KSLOC Calculator
Size software in thousands of source lines, counted or converted.
What this calculator does
COCOMO II takes size in KSLOC and documents conversion from functional size using a language-dependent ratio. That ratio must be the organisation's own measured value; the calculator supplies none.
Inputs and what they mean
- Sizing method
- — Two published ways to reach a size. They are not combined..
- Source lines of code
- — Used by the source-line method..
- Function points
- — Used by the conversion method..
- Your own lines of code per function point
- — Taken from your own codebase in your own language. No conversion table is supplied..
How to use it
- Enter your own figures — the calculator never fills in a rate, price or benchmark for you.
- Press Calculate to see the result.
- Read the formula, variables, assumptions and source below the result before you rely on it.
Formula
Line count method: KSLOC = SLOC ÷ 1000. Conversion method: KSLOC = (Function points × Your lines per function point) ÷ 1000
Worked example
128,400 source lines
A straight line count; the conversion method stays a separate choice.
Reading the result
The headline figure is the main answer. Any breakdown underneath shows the parts that make it up, so you can check the working and see what changes when you adjust an input.
Limitations and assumptions
Results depend entirely on the figures you enter and are rounded for display. They are for general information and education, not professional advice.
Reference: University of Southern California, Center for Systems and Software Engineering — COCOMO II model definition manual
Last reviewed:
Common questions
Formula, source and verification
Size in thousands of source lines, by either of two published routes. The two routes are separate choices and are never combined.
The question it answers: What size do I feed into the estimation model?
The formula
Line count method: KSLOC = SLOC ÷ 1000. Conversion method: KSLOC = (Function points × Your lines per function point) ÷ 1000
- SLOC — Source lines of code
- (lines). Counted source lines, used by the line count method.
- FP — Function points
- (FP). Functional size, used by the conversion method.
- g — Lines of code per function point
- (lines/FP). The organisation's own ratio for its own language; no conversion table is supplied.
Units: Lines; thousands of lines; function points.
What kind of calculation this is
Estimation model. This is a published estimation model. It produces an estimate, not a measured fact, and its accuracy depends on how well your situation matches the model.
Method
COCOMO II takes size in KSLOC and documents conversion from functional size using a language-dependent ratio. That ratio must be the organisation's own measured value; the calculator supplies none.
Assumptions built into the result
- Operational: Lines are counted under one consistent counting rule.
Figures this calculator will never guess for you
- No industry delivery rate, productivity figure, defect rate or cost per line is inserted.
- No optional component is filled in on the user's behalf.
- No language gearing factor is provided.
- The two sizing methods are never averaged or combined.
Limitations
- Converted sizes inherit all the uncertainty of the conversion ratio.
- A size, not an effort or a cost.
Source and version
- Standard or reference
- COCOMO II post-architecture model — University of Southern California, Center for Systems and Software Engineering (COCOMO II Model Definition Manual — post-architecture effort PM = A × Size^E × ΠEM with A = 2.94 and E = B + 0.01 × ΣSF (B = 0.91), and schedule TDEV = C × PM^(D + 0.2 × (E − B)) × SCED%/100 with C = 3.67 and D = 0.28.)
- Published source
- University of Southern California, Center for Systems and Software Engineering — COCOMO II.2000
- Formula version
- Version 1
- Verification
- Reviewed against the cited source on
- How much weight the source carries
- Academic
- Applies to
- Currency
- The result is a ratio or index, so it does not depend on currency.
Related tools
Work out the hourly rate to charge a client so that target margin is met after overhead and non-billable time.
Find the true hourly cost of an employee once benefits, payroll cost and overhead are included.
Size a software application from its data and transaction functions before estimating effort or cost.
Estimate development effort, schedule and average team size for a software project of a known size.
Express cloud spend as a cost per customer, per transaction or per other business unit.
Set the rate used to apply manufacturing overhead to jobs for the coming period.