Cyclomatic Complexity Calculator

Calculate McCabe cyclomatic complexity for every function in JavaScript, TypeScript, Python, Java, C#, C++, C or Go. Free and private: runs in your browser.

Paste code and get the cyclomatic complexity of each function with a simple, moderate, complex or very-high-risk rating. The language is detected automatically.

Runs entirely in your browser. Nothing you paste is uploaded or stored.

Use cases

  • Check a function before opening a pull request.
  • Explain a review comment with numbers instead of opinions.
  • Find the riskiest code to refactor first.

Frequently asked questions

What is a good cyclomatic complexity score?

1–10 is simple and easy to test. 11–20 is moderate, 21–50 is complex, and anything above 50 is very hard to test or change safely. Many teams fail reviews above 10 or 15.

Is the Cyclomatic Complexity Calculator free?

Yes. It is free with no sign-up, and it runs entirely in your browser, so your input is never uploaded or stored.

How accurate is a browser-based code check?

It uses fast heuristics on the snippet you paste, so it is great for quick feedback. For whole repositories, cross-file analysis and history, run a full CodeInspector scan.

Related tools

Track complexity, duplication and code smells across your whole codebase with CodeInspector.

All free developer tools