scitools.com

← Metric catalog

Halstead Difficulty (D) is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.

Halstead Difficulty (D)

API ID: HalsteadDifficulty
Languages: Any
Targets: Files, Functions

Halstead Difficulty (D) measures how hard a program is to write or understand

It's calculated as: