SLOCCount
Make a codebase’s size easier to discuss
A code-analysis tool that reports physical source lines, comments, generated-code exclusions and effort estimates built from explicit COCOMO assumptions.

Separate the inventory from the estimate
SLOCCount examines the physical shape of a codebase: source lines, comments, blank lines, language distribution and a lightweight complexity proxy. It then offers a separate estimation layer built around explicit COCOMO II assumptions. Keeping those layers distinct makes it possible to discuss what was counted before debating what a model predicts it would cost to build.
The analysis pipeline
A scanner discovers files, applies ignore rules and maps extensions or exact filenames to language definitions. Per-file analysis removes comments, looks for generated-code markers and counts source and control-flow keywords. Parallel workers process the files, and Git integration adds contributor and commit totals.
The tool covers more than 30 language and configuration formats in its documentation. Reports can be read as formatted text or exported as JSON and CSV. Counting, analysis, estimation and presentation are separate components so the results can be inspected or consumed by other tools.
Make the assumptions visible
The estimation layer uses source size, scale factors, effort multipliers, salary and overhead to produce effort, schedule and cost figures. Those outputs change with the assumptions. They are useful for a scenario discussion, but a line count is not a measure of individual productivity and an effort estimate is not an audited valuation of the software.
Implementation at a glance
- Supports 30-plus language/configuration formats in its documented scanner.
- Produces text, JSON and CSV reports with Git statistics.
- Separates counting/analysis from effort, schedule and cost estimation.
Project status
Physical code metrics and assumption-based estimates. Complexity uses a lightweight keyword proxy; cost and schedule outputs require interpretation.