Machine learningSoftware Metrics

Cyclomatic Complexity

Cyclomatic Complexity (CC), introduced by Thomas McCabe in 1976, is a quantitative metric measuring the number of linearly independent paths through a function's control-flow graph. A function with high cyclomatic complexity is harder to understand, test, and maintain; McCabe advocated a threshold of 10 as the complexity limit for maintainability.

Open in MethodMindSoonVideoSoon

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Sources

  1. McCabe, T. J. (1976). A complexity measure. IEEE Transactions on Software Engineering, SE-2(4), 308–320. DOI: 10.1109/TSE.1976.233837
  2. Campbell, G. H. (1986). Defining a good metric, a software testing perspective. ASQ Software Quality Conference. link
  3. Nagy, C., & Kriebel, K. (2001). Achieving optimal complexity and reliability. SAMS Publishing. ISBN: 0672322285

Related methods

Referenced by

ScholarGateCyclomatic Complexity (Cyclomatic Complexity Metric). Retrieved 2026-06-04 from https://scholargate.app/en/numerical-methods/cyclomatic-complexity