scitools.com

← Metric catalog

Halstead Length (N) 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 Length (N)

API IDHalsteadLength
TargetsFiles Functions
LanguagesAny
CategoriesTokens
CostSlow
SuitesHalstead

Halstead Length (N) is the sum of total operators (N1) and total operands (N2)

It's calculated as

See all Halstead metrics.