Weights and Measures Compliance Calculator
ANA›Life Services Authority›National Calculator Authority›Weights and Measures Compliance Calculator
.calc-container { max-width: 640px; margin: 2rem 0; padding: 1.5rem; background: #fff; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); font-family: system-ui, -apple-system, sans-serif; } .calc-container h3 { font-family: Georgia, serif; font-size: 1.15rem; color: #1a1a1a; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--ac, #3d5a80); } .calc-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; } .calc-row label { min-width: 160px; font-size: 0.9rem; color: #333; font-weight: 500; } .calc-row input[type="number"], .calc-row select { flex: 1; min-width: 120px; max-width: 200px; padding: 0.5rem 0.6rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem; font-family: system-ui, sans-serif; color: #1a1a1a; background: #fafaf8; } .calc-row input:focus, .calc-row select:focus { outline: none; border-color: var(--ac, #3d5a80); box-shadow: 0 0 0 2px rgba(26,74,138,0.12); } .calc-row .unit { font-size: 0.82rem; color: #888; min-width: 30px; } .calc-btn { display: inline-block; margin-top: 0.5rem; padding: 0.55rem 1.5rem; background: var(--ac, #3d5a80); color: #fff; border: none; border-radius: 4px; font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: system-ui, sans-serif; } .calc-btn:hover { opacity: 0.9; } .calc-result { margin-top: 1.25rem; padding: 1rem 1.25rem; background: #f0f6fc; border-left: 3px solid var(--ac, #3d5a80); border-radius: 0 6px 6px 0; display: none; } .calc-result.visible { display: block; } .calc-result-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: #666; margin-bottom: 0.25rem; } .calc-result-value { font-size: 1.6rem; font-weight: 700; color: var(--ac, #3d5a80); } .calc-result-detail { font-size: 0.85rem; color: #555; margin-top: 0.5rem; line-height: 1.5; } .calc-note { margin-top: 1rem; font-size: 0.8rem; color: #888; font-style: italic; } .calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem; } .calc-grid-item { padding: 0.6rem 0.8rem; background: #f8f9fa; border-radius: 4px; border: 1px solid #eee; } .calc-grid-item .label { font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 0.04em; } .calc-grid-item .value { font-size: 1.1rem; font-weight: 600; color: #1a1a1a; } @media (max-width: 720px) { .calc-row { flex-direction: column; align-items: flex-start; gap: 0.3rem; } .calc-row label { min-width: auto; } .calc-row input[type="number"], .calc-row select { max-width: 100%; width: 100%; } .calc-grid { grid-template-columns: 1fr; } } .calc-chart { margin: 1rem 0; text-align: center; } .calc-chart svg { max-width: 100%; height: auto; } .calc-chart-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.2rem; margin-top: 0.6rem; font-size: 0.8rem; color: #555; } .calc-chart-legend span { display: inline-flex; align-items: center; gap: 0.3rem; } .calc-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; font-style: normal; } .calc-related { max-width: 640px; margin: 2rem 0 1rem; padding: 1.25rem 1.5rem; background: #f8f9fa; border: 1px solid #e8e8e8; border-radius: 8px; } .calc-related h3 { font-family: Georgia, serif; font-size: 1rem; color: #1a1a1a; margin: 0 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ac, #3d5a80); } .calc-related-list { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1.5rem; } .calc-related-list li a { font-size: 0.88rem; color: var(--ac, #3d5a80); text-decoration: none; } .calc-related-list li a:hover { text-decoration: underline; } .calc-browse-all { margin: 0.5rem 0 0; font-size: 0.9rem; font-weight: 600; } .calc-browse-all a { color: var(--ac, #3d5a80); text-decoration: none; } .calc-browse-all a:hover { text-decoration: underline; } @media (max-width: 720px) { .calc-related-list { grid-template-columns: 1fr; } }
Weights and Measures Compliance Calculator
Determine whether a packaged product's actual net quantity is within the legal tolerance limits defined by NIST Handbook 133 (Checking the Net Contents of Packaged Goods), which is adopted by most U.S. states and many international jurisdictions.
Labeled (Declared) Net Quantity
Unit of Measure
Ounces (oz) – weight Pounds (lb) Grams (g) Kilograms (kg)
Fluid Ounces (fl oz) Pints (pt) Quarts (qt) Gallons (gal) Milliliters (mL) Liters (L)
Actual Measured Net Quantity (same unit)
Number of Packages in Sample Lot
Number of Packages with MAE Violations (optional)
MAE = Maximum Allowable Error. Enter how many packages in the lot exceed the MAE threshold.
Check Compliance
function weiCalc() { var resultDiv = document.getElementById('wei_result'); resultDiv.style.display = 'block'; resultDiv.className = 'calc-result';
var labelQty = parseFloat(document.getElementById('wei_label_qty').value); var unit = document.getElementById('wei_unit').value; var actualQty = parseFloat(document.getElementById('wei_actual_qty').value); var numPkg = parseInt(document.getElementById('wei_num_packages').value); var maeCount = parseInt(document.getElementById('wei_mae_count').value) || 0;
// --- Validation --- if (isNaN(labelQty) || labelQty ⚠ Please enter a valid labeled net quantity greater than 0.'; return; } if (isNaN(actualQty) || actualQty ⚠ Please enter a valid actual measured quantity (0 or greater).'; return; } if (isNaN(numPkg) || numPkg ⚠ Number of packages must be at least 1.'; return; } if (maeCount numPkg) { resultDiv.innerHTML = '⚠ MAE violation count cannot exceed the total number of packages.'; return; }
// --------------------------------------------------------------- // NIST HB 133 Table 2-3 / 2-4: MAE (Maximum Allowable Error) // expressed as a percentage of labeled quantity, by commodity type // Weight commodities (oz/lb/g/kg) and Volume commodities (fl oz etc.) // The MAE is the SAME table for both weight and volume in HB 133. // // Labeled Quantity Range → MAE (% of labeled qty) // = 20 lb (>= 320 oz) → 1% // // For volume, same breakpoints apply using fl oz equivalents. // ---------------------------------------------------------------
// Convert labeled quantity to ounces (weight) or fl oz (volume) for MAE lookup var isVolume = ['fl_oz','pt','qt','gal','mL','L'].indexOf(unit) >= 0; var labelInBaseUnit; // oz (weight) or fl oz (volume)
if (!isVolume) { // Weight → convert to oz if (unit === 'oz_weight') labelInBaseUnit = labelQty; else if (unit === 'lb') labelInBaseUnit = labelQty * 16; else if (unit === 'g') labelInBaseUnit = labelQty / 28.3495; else if (unit === 'kg') labelInBaseUnit = labelQty * 35.274; } else { // Volume → convert to fl oz if (unit === 'fl_oz') labelInBaseUnit = labelQty; else if (unit === 'pt') labelInBaseUnit = labelQty * 16; else if (unit === 'qt') labelInBaseUnit = labelQty * 32; else if (unit === 'gal') labelInBaseUnit = labelQty * 128; else if (unit === 'mL') labelInBaseUnit = labelQty / 29.5735; else if (unit === 'L') labelInBaseUnit = labelQty * 33.814; }
// Determine MAE percentage from NIST HB 133 Table 2-3 var maePct; if (labelInBaseUnit = labeled qty // (here we use the single measured package as the "average" for a // single-package check; for lot checks the user supplies maeCount) // 2. Individual Package Test: no single package may be below (labeled - MAE) // 3. Unreasonable Shortage: no package may be below (labeled - 2×MAE) // 4. MAE Violation Rate: ≤ 2 packages per 30 (≈ 6.67%) may exceed MAE // (for lots of 1–30 packages, max 2 violations allowed) // ---------------------------------------------------------------
var doubleMAE = 2 * maeValue; var unreasonableLimit = labelQty - doubleMAE;
// Individual package tests var passIndividual = actualQty >= lowerLimit; var passUnreasonable = actualQty >= unreasonableLimit;
// Lot MAE violation rate (NIST HB 133 Table 2-5) // For sample size 1–30: max 2 packages may have MAE violations // For sample size 31–80: max 3; 81–200: max 5; >200: max 7 var maxMaeViolations; if (numPkg = labeled) var passAverage = actualQty >= labelQty;
// Overall compliance var overallPass = passIndividual && passUnreasonable && passLotMAE;
// Unit label for display var unitLabel = { oz_weight:'oz', lb:'lb', g:'g', kg:'kg', fl_oz:'fl oz', pt:'pt', qt:'qt', gal:'gal', mL:'mL', L:'L' }[unit];
- function fmt(v, d)
- function statusBadge(pass) {
- return pass
- ? 'PASS'
- 'FAIL'; }
var overallColor = overallPass ? '#27ae60' : '#c0392b'; var overallText = overallPass ? '✔ COMPLIANT' : '✗ NON-COMPLIANT';
var html = '' + '### ' + overallText + ' ' + 'Based on NIST Handbook 133 individual package and lot compliance rules.
' + '';
html += '' + '' + 'Parameter' + 'Value' + '';
var rows = [ ['Labeled Net Quantity', fmt(labelQty,4) + ' ' + unitLabel], ['Actual Measured Quantity', fmt(actualQty,4) + ' ' + unitLabel], ['Shortfall (Labeled − Actual)', fmt(shortfall,4) + ' ' + unitLabel + ' (' + fmt(shortfallPct,2) + '%)'], ['MAE Rate (NIST HB 133)', (maePct*100).toFixed(0) + '%'], ['MAE Value', fmt(maeValue,4) + ' ' + unitLabel], ['Minimum Acceptable Qty (Label − MAE)', fmt(lowerLimit,4) + ' ' + unitLabel], ['Unreasonable Shortage Limit (Label − 2×MAE)', fmt(unreasonableLimit,4) + ' ' + unitLabel], ['Maximum Fill (Label + MAE)', fmt(upperLimit,4) + ' ' + unitLabel], ];
var alt = false; rows.forEach(function(r) { html += '' + '' + r[0] + '' + '' + r[1] + '' + ''; alt = !alt; }); html += '';
html += '#### Compliance Test Results '; html += '' + '' + 'Test' + 'Criterion' + 'Result' + '';
var tests = [ [ 'Individual Package (MAE)', 'Actual ≥ Labeled − MAE (' + fmt(lowerLimit,4) + ' ' + unitLabel + ')', passIndividual ], [ 'Unreasonable Shortage', 'Actual ≥ Labeled − 2×MAE (' + fmt(unreasonableLimit,4) + ' ' + unitLabel + ')', passUnreasonable ], [ 'Average / Overfill Check', 'Actual ≥ Labeled (no systematic short-fill)', passAverage ], [ 'Lot MAE Violation Rate', maeCount + ' violations ≤ ' + maxMaeViolations + ' allowed (for n=' + numPkg + ')', passLotMAE ], ];
alt = false; tests.forEach(function(t) { html += '' + '' + t[0] + '' + '' + t[1] + '' + '' + statusBadge(t[2]) + '' + ''; alt = !alt; }); html += '';
// Interpretation note if (!passUnreasonable) { html += '⚠ Unreasonable Shortage: ' + 'The actual quantity is more than 2× the MAE below the labeled quantity. ' + 'This is an automatic enforcement violation regardless of lot averages.
'; } else if (!passIndividual) { html += '⚠ MAE Exceeded: ' + 'The package is short by more than the Maximum Allowable Error. ' + 'This counts as one MAE violation in the lot tally.
'; } else if (!passAverage) { html += '⚠ Below Label: ' + 'The package is short but within the MAE tolerance. ' + 'Systematic short-filling across a lot will still fail the average test.
'; }
if (!passLotMAE) { html += '⚠ Lot MAE Rate Exceeded: ' + maeCount + ' packages exceed the MAE, but only ' + maxMaeViolations + ' are permitted for a lot of ' + numPkg + '. The lot is non-compliant.
'; }
resultDiv.innerHTML = html; }
#### Formulas Used
Maximum Allowable Error (MAE):
MAE_value = Labeled_Qty × MAE_rate
MAE_rate (NIST HB 133 Table 2-3, by labeled qty in oz or fl oz): < 1 oz/fl oz → 9% 1 – <2 → 8% 2 – <3 → 7% 3 – <4 → 6% 4 – <6 → 5% 6 – <16 → 4% (up to 1 lb / 1 pt) 16 – <64 → 3% (1 lb – <4 lb) 64 – <320 → 2% (4 lb – <20 lb) ≥ 320 → 1% (≥ 20 lb)
Individual Package Tests: MAE Test: Actual ≥ Labeled − MAE_value Unreasonable Shortage: Actual ≥ Labeled − 2 × MAE_value
Lot Compliance (NIST HB 133 Table 2-5): Max MAE violations allowed: n = 1–30 → 2 packages n = 31–80 → 3 packages n = 81–200 → 5 packages n > 200 → 7 packages
Shortfall (%) = ((Labeled − Actual) / Labeled) × 100
#### Assumptions & References
- Compliance criteria follow NIST Handbook 133 (6th Edition, 2023), Checking the Net Contents of Packaged Goods, adopted by most U.S. states under the Uniform Packaging and Labeling Regulation (UPLR).
- The MAE table applies to both weight and volume commodities; volume quantities are converted to fluid-ounce equivalents for table lookup only.
- The individual package test checks a single package against the MAE threshold. A package below (Labeled − MAE) counts as one MAE violation in the lot tally.
- The unreasonable shortage rule (below Labeled − 2×MAE) is an automatic enforcement action for the individual package, independent of lot averages.
- The lot average test requires the mean net quantity of all sampled packages to be ≥ the labeled quantity; a single-package entry is treated as the mean.
- The lot MAE violation rate uses NIST HB 133 Table 2-5 acceptance numbers.
- Reference: NIST HB 133 (2023) — https://www.nist.gov/pml/weights-and-measures/publications/nist-handbooks/hb133
More Calculators
- Dispensary Startup Cost Estimator
- Door Hinge Placement Calculator
- THC/CBD Potency & Serving Size Calculator
- Craps Odds & Payout Calculator
- Weatherstripping Length and Cost Calculator
- Drain Cleaning Chemical Dilution Calculator
- Door Swing Clearance Calculator
- HVAC Equipment Replacement Cost Estimator — Estimate replacement costs based on WV labor rates and system type
- West Virginia HVAC Contractor License Requirements Checker — Verify continuing education and bonding requirements by WV license class
- West Virginia Heating Degree Days Calculator — Estimate seasonal heating demand based on WV regional climate data
- Humidity and Ventilation Load Calculator — Account for WV's variable humidity levels in HVAC system sizing
- Insulation R-Value Calculator
Read Next
West Virginia Hvac Contractor License Requirements Checker Verify Continuing Education And Bonding Requirements By Wv License Class ANA › Life Services Authority › National Calculator Authority › West Virginia HVAC Contractor License Requirements Checker —...
Study Time Planner ANA › Life Services Authority › National Calculator Authority › Study Time Planner .calc-container { max-width: 640px; margin:...