scitools.com

← Metric catalog

Halstead Vocabulary (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 Vocabulary (n)

API IDHalsteadVocabulary
TargetsFiles Functions
LanguagesAny
CategoriesTokens
CostSlow
SuitesHalstead

Halstead Vocabulary (n) is the sum of unique operators (n1) and unique operands (n2)

It's calculated as

See all Halstead metrics.