NLOC
NLOC, or Number of Lines of Code, is a software size metric used to estimate the size of a codebase by counting lines of source code. Counting rules vary: some methods exclude blank lines and comments, while others count them; some count only executable statements, and others count every line that contains code. Because counting conventions differ across languages and projects, NLOC is not directly comparable without a defined counting standard.
In practice, NLOC supports rough sizing for planning, effort estimation, budgeting, and historical benchmarking. It is
Limitations include its sensitivity to language verbosity and coding style, and its inability to reflect code
Counting approaches may differ by granularity (project-wide, module, file) and by whether comments and blank lines
Related metrics include cyclomatic complexity, function points, and code churn, which, together with NLOC, provide a