# Align numeric report columns without adding spaces

Canonical: https://githtml.com/guides/align-report-numbers-tabular-nums
Published: 2026-11-23
Publisher: WaveTech LLC / gitHtml

Use real table cells or another suitable structure for numeric comparisons, then apply tabular-nums when the font supports it. Align numbers consistently and state units in headers or labels. Equal-width digits improve scanning, but they do not normalize precision, align decimal points automatically, or make unlike measurements comparable.

## Choose the right representation

Numbers with different digit widths can appear to shift even when each cell has the same alignment. Tabular figures address that typographic issue without requiring a monospace font for the entire report. They are particularly useful in a column that mixes many ones with wider digits, where visual comparison otherwise feels uneven.

## Apply the pattern deliberately

Set numeric styling on the relevant cells rather than every paragraph. Use consistent decimal precision only when that precision is meaningful. Padding values with zeros can imply certainty the measurement does not support. Keep missing values visibly distinct from zero, and explain whether a dash means unavailable, not applicable, or not measured.

1. Choose a consistent unit and explain it in a column heading or adjacent label.
2. Apply tabular-nums to numeric values and retain meaningful differences in measurement precision.
3. Compare a negative value and a missing value to ensure neither is mistaken for zero.

````css
td.numeric { text-align: end; font-variant-numeric: tabular-nums; }
````

## Distinguish digit spacing from decimal alignment

Create a comparison column with 11, 88, 101, and 808. With proportional figures, equal-length values can occupy noticeably different widths; tabular figures request equal advance widths from a supporting font. Now add 1.2 and 12.34. Equal-width digits do not make the decimal points line up by themselves. Decide whether consistent precision is justified by the data, or whether the table needs a more explicit presentation of whole and fractional components.

Treat unit conversion as a data decision rather than a CSS fix. A column containing milliseconds, seconds, and minutes can look beautifully aligned while encouraging incorrect comparisons. Normalize units when that is legitimate, or print each unit clearly. Similarly, do not replace unknown readings with zero merely to preserve a tidy numeric pattern. Use a stated missing-value label and keep it visually different from an observed zero and from a measured value below a reporting threshold.

Check the fallback font as well as the preferred font, especially when your report is meant to travel offline. If the preferred font is not available, the reader still needs correct values and clear headers even if the alignment is less polished. Avoid adding spaces to the content to imitate digit widths: those spaces can survive copying, distort sorting in another tool, and break when the font changes. Keep the data clean and let typography handle presentation.

## Check the finished reading experience

Try a column containing small values, large values, negative values, and missing entries. Confirm that the font actually exposes suitable numeric features; otherwise the declaration may have little visible effect. The test should establish that readers can compare values correctly, not merely that the column looks tidier.

## Sources and further reading

- [MDN: font-variant-numeric](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/font-variant-numeric)

## Related guides

- [Move a reading task between iPhone and iPad without losing context](https://githtml.com/guides/move-reading-between-iphone-ipad-without-losing-context)
- [Read technical HTML comfortably on iPad in portrait and landscape](https://githtml.com/guides/read-technical-html-ipad-portrait-landscape)
- [Build a small GitHub document reading queue with favorites and recents](https://githtml.com/guides/favorites-recents-document-reading-queue)
- [Find answers in long HTML reports with better search queries](https://githtml.com/guides/search-long-html-report-with-better-queries)

Editorial approach: https://githtml.com/guides/about
