KiloAtlas
EN
EnglishBahasa IndonesiaTiếng Việt

Cyclomatic Complexity Calculator

Calculate McCabe complexity from control-flow graph counts for one or more separate modules.

Cyclomatic complexity M

—

Your result is calculated in your browser.

Formula

M = E − N + 2P; each of P components has one entry and one exit.

How to use

  1. Count graph edges E and nodes N.
  2. Enter the number of separate components P.
  3. Read the sum of independent path counts.

Examples

  • E = 15, N = 14, P = 1 gives M = 3.

Frequently asked questions

What is a component?

A connected module flow graph with one entry and exit; use P = 1 for a single module.

Does the tool inspect source code?

No. Supply graph counts yourself; numerical checks cannot establish graph structure.

Which counts are rejected?

Counts must be integers with P ≥ 1, N ≥ P and E ≥ N − P.

Sources

Updated:

Related tools

Search conversion tools