STUD
← Plays

Calculate · Assess & Decide · Engineering

Maintainability index per module

The Maintainability Index (raw and 0-100 normalized) per module from Halstead volume, cyclomatic complexity, and lines of code, with a maintainability band.

You receive: A reviewed maintainability-index calculator + the passing test report, run on your module metrics.

Part of Ship MVP

What's verified: STUD verifies the calculator computes the Maintainability Index per module on held-out cases: MI_raw = 171 - 5.2*ln(Halstead volume) - 0.23*complexity - 16.2*ln(lines of code), the 0-100 normalization clamped at zero, and the band from your cutoffs (volume and lines must be positive). STUD does NOT compute Halstead volume or complexity from real code, nor decide whether a band means a module is genuinely maintainable; it checks the formula on the metrics you provide.

Opens soon

Cost15 credits
ProtectionHeld until verified delivery

This play is verified and ready. It opens soon, once sign-in and payments are live.

Example

A sample of what this play produces. Your result is generated for your inputs.

0-100Scale

Band thresholds

Moderate min10
Good min20

Rows

NameMi rawMi 100Band
facts-store.ts49.6629.04good
lenses.ts21.612.63moderate
tasks.py-99.080low
Inputs
Modules
NameHalstead volumeCyclomatic complexityLoc
facts-store.ts9008180
lenses.ts300018600
tasks.py25000018025000
Rounding dp2

Arithmetic recomputed against the judge tasks.py _mi_reference oracle, 2026-08-08: per module, MI_raw = 171 - 5.2*ln(halstead_volume) - 0.23*cyclomatic_complexity - 16.2*ln(loc), and MI_100 = max(0, MI_raw*100/171). facts-store.ts: 171 - 5.2*ln(900) - 0.23*8 - 16.2*ln(180) = 49.66 raw, 29.04 on the 0-100 scale, band good (at or above the good_min of 20). lenses.ts: 21.6 raw, 12.63, band moderate (between 10 and 20). The tasks.py module: -99.08 raw, clamped to 0 on the 0-100 scale, band low. The module metrics are illustrative readings over modules in STUD's own codebase; the play checks the formula on the metrics you provide, it does not measure Halstead volume or complexity from your code.

Get early access to STUD the day it goes live.