DHU (Defects Per Hundred Units) calculator for garment industry quality control.
Daily QC metric used across CMT factories worldwide. Built and used in production by Scan ERP — a 100+ machine garment factory ERP that tracks DHU in real time from bundle-level damage reports.
| Language | Install | Source |
|---|---|---|
| Node.js / TypeScript | npm install garment-dhu-calculator |
npm/ |
| Python 3.7+ | pip install garment-dhu-calculator |
python/ |
DHU = (Total defects found / Total garments inspected) × 100
Critical: DHU counts defects, not defective pieces. One garment can have multiple defects — all are counted.
Example: 250 garments, 35 defects → DHU = 14.
calculateDHU/calculate_dhu— basic DHUcalculateDHUByType/calculate_dhu_by_type— breakdown by defect typeaggregateDailyDHU/aggregate_daily_dhu— across multiple checkersclassifyDHU/classify_dhu— industry benchmark classification
| DHU range | Classification |
|---|---|
| ≤ 5% | EXCELLENT |
| ≤ 10% | GOOD |
| ≤ 15% | ACCEPTABLE |
| ≤ 25% | POOR |
| > 25% | CRITICAL |
This calculator is free. The full ERP that auto-computes DHU from every damage report on the factory floor — with photo evidence and severity classification — is at scanerp.pro.
- Live demo · 1.4M+ pieces tracked
- DHU benchmarks 2026
- Reduce rejection rate guide
- Free 30-day trial
MIT © Santosh Rijal / Scan ERP
- garment-aql-calculator — ISO 2859-1 AQL sampling
- garment-line-efficiency
- garment-fabric-consumption
- garment-cmt-cost
- garment-smv-calculator
- garment-piece-rate
Part of the Scan ERP open-source garment toolkit — production-tested utilities for CMT factory operations, all MIT licensed:
- aql-sample-size — ISO 2859-1 sample-size lookup (zero-dependency data library)
- garment-aql-calculator — Full AQL inspection decision engine with pass/fail logic
- garment-bundle-id — Bundle QR code generator + parser (STYLE-LOT-COLOR-SIZE-BUNDLE# format)
- garment-cmt-cost — CMT cost calculator with 13-country CPM comparison
- garment-dhu-calculator — Defects Per Hundred Units with defect-type breakdown + multi-checker aggregation
- garment-fabric-consumption — Fabric consumption (knit GSM × area, woven marker length)
- garment-line-efficiency — Line efficiency, target output, line balance / bottleneck detection
- garment-piece-rate — Piece-rate earnings calculator with bonuses and overtime
- garment-smv-calculator — Stopwatch SMV/SAM with Westinghouse performance rating
See the curated awesome-garment-erp list for the full Scan ERP ecosystem, or visit scanerp.pro for the production garment manufacturing ERP this toolkit powers.