A serving with 1.49 g of added sugars can display 1 g and 3% Daily Value when the percentage uses the unrounded amount. A serving with 3.2 mg of cholesterol can display less than 5 mg. A label engine that applies a common rounding function to every row loses both rules.
Keep the source amount, unit, serving basis, calculation method, and final display value as separate fields. The examples below use the standard U.S. label for adults and children aged four and older. 21 CFR 101.9
Cholesterol needs a branch before rounding
Under § 101.9(c)(3), cholesterol is generally expressed to the nearest 5 mg per serving. Below 2 mg, a product that makes no claim about fat, fatty acids, or cholesterol can declare zero or omit the row under the applicable rules. Omission generally calls for the prescribed insignificant-source statement, with the simplified-format exception in paragraph (f). The regulation permits a less-than-5-mg declaration for the 2-to-5-mg range. A deterministic formatter can use that option below 5 mg and use 5 mg at exactly 5 mg. 21 CFR 101.9(c)(3) and (f)
| Source amount per serving | Example display or decision |
|---|---|
| 1.99 mg | 0 mg in the eligible no-claim case |
| 2.00 mg | Less than 5 mg |
| 4.99 mg | Less than 5 mg |
| 5.00 mg | 5 mg |
| 8.10 mg | 10 mg |
Test the 1.99 mg fixture with and without a relevant claim. The eligibility check belongs upstream of the amount formatter.
Added sugars grams and %DV use different rules
In the standard panel, the Added Sugars line sits under Total Sugars. Declare the amount to the nearest gram, with a less-than-1-g option when the serving contains less than 1 g and a zero option below 0.5 g. For the %DV column, the standard reference is 50 g and the result is displayed to the nearest whole percent. Section 101.9(d)(7)(ii) permits either the declared amount or the unrounded amount as the numerator for this calculation. Keep the chosen basis in the exported proof record. FDA has separate guidance for single-ingredient sugars and syrups. 21 CFR 101.9(c)(6)(iii) and (d)(7)(ii) · FDA Daily Value reference
| Step | Fixture result |
|---|---|
| Store exact added sugars per serving | 1.49 g |
| Round the line amount | 1 g |
| Calculate %DV from the source amount | 1.49 ÷ 50 × 100 = 2.98% → 3% |
| Calculate %DV from the declared amount | 1 ÷ 50 × 100 = 2% → 2% |
Calculate energy from the source amounts
The general Atwater factors are 4 kcal/g for protein, 4 for total carbohydrate, and 9 for fat. Apply the factors to unrounded amounts. FDA also allows other methods, including specific Atwater factors and a method that accounts for non-digestible carbohydrates and sugar alcohols with their own factors. Document which method the product uses. The calorie declaration rounds to the nearest 5 Calories through 50 and to the nearest 10 above 50. Below 5 Calories, zero is an available declaration. 21 CFR 101.9(c)(1)
For a serving with 4.49 g protein, 10.49 g total carbohydrate, and 6.49 g fat, general 4-4-9 gives 118.33 kcal, or 120 Calories on the panel. Recalculating from the displayed 4 g, 10 g, and 6 g yields 110 kcal. A discrepancy like that is expected when someone reconstructs energy from a rounded panel.
UPC-A uses a modulo-10 check digit
For the 11-digit UPC-A payload 03600029145, multiply positions 1, 3, 5, 7, 9, and 11 from the left by three. The odd-position digits sum to 14 and the even positions sum to 16, for a weighted sum of 58. The check digit is (10 - 58 % 10) % 10 = 2, so the full GTIN-12 is 036000291452. Keep identifiers as strings to preserve the first zero. Verify assignment and print scan quality separately. GS1 General Specifications · Verified by GS1
function upcACheckDigit(payload) { if (!/^[0-9]{11}$/.test(payload)) throw new Error("Use exactly 11 digits"); const weightedSum = Array.from(payload, Number) .reduce((sum, digit, index) => sum + digit * (index % 2 === 0 ? 3 : 1), 0); return (10 - weightedSum % 10) % 10; } console.assert(upcACheckDigit("03600029145") === 2); Preflight the vector proof at actual size
- Give SVG a
viewBoxand explicit physical width and height. Check those dimensions against the PDF page or trim box. - Verify the applicable layout and type sizes at 100% print scale, including rules for smaller packages and dual columns. Check translated text and line breaks in a bilingual layout. 21 CFR 101.9(d) and (j)(13)
- Preserve bar widths and quiet zones through export. Scan the proof at the final size. Keep the original vector text and paths, or follow the printer's requirements for fonts and outlines.
- If the printer requests a 300 DPI raster proof, multiply the final size in inches by 300. A 2 × 1.5 inch panel needs 600 × 450 pixels. Vector paths scale independently of that raster resolution.
For a sample proof, enter the reviewed per-serving data, select the applicable layout, and compare the PDF and SVG exports at their final dimensions. NutritionLabelPack label builder
Disclosure. The publisher operates NutritionLabelPack. AI generated the initial draft.