Marcus Andrey Study
Ler em português Library

Complex products · Step 3 · 9 min read

Columns, alignment and number formats

Which columns a table shows and in what order, why text goes left and numbers go right, one format per column, numbers and dates that change with the reader's language, and what to do with text that doesn't fit. With Gale's parts table, before and after.

People compare by reading down a column, so the column is where a table earns its keep. A warehouse clerk at Cabo Alto Energia looks at the unit cost column to find the expensive part before she ships it. If the numbers are centred, with decimals that come and go, she has to read each one. If they line up, she sees it before reading a digit. Most of this lesson is small decisions like that, made once per column and then kept.

What you'll be able to do after reading:

  • Choose and order a table's columns from the task
  • Align text, numbers and headers so columns can be compared
  • Give each column one format, including empty values
  • Show numbers, dates and times in the reader's language and time zone
  • Decide when to wrap, truncate or widen a column

1. Which columns, and in what order

Start from the task, not from the database. In Anatomy of a data table you met NN/g's four tasks; for columns the relevant one is "compare data". Ask: what does this person compare, every day? Those columns go in. The rest can wait one click away.

NN/g gives the order: "default order of the columns should reflect the importance of the data to the user and related columns should be adjacent", and adds that "hiding and reordering columns must be easy to accomplish" (Laubheimer, NN/g, 2022).

For Gale's parts table (one row per stock line: one part, in one stock location), the clerk's order is:

  1. Part: the description people say, with the part number under it. The identifier comes first.
  2. Location: where it sits, warehouse and bin (a bin is the numbered shelf space a part lives in).
  3. On hand and Reserved: next to each other, because people compare them.
  4. Unit, then Unit cost.

The default is for the most common role. A planner who wants the supplier column adds it to her own view; she shouldn't make everyone's table wider.


2. Text left, numbers right

Before: values as they were typedEverything centred, decimals that come and go, the currency in three places, the unit inside the number.

Unit costPartStockRes.Where
€86.4Gearbox oil filter184PT-WH1 · A3-12
7.95Gear oil, ISO VG 320640 L120PT-WH1 · B1-02
18450.5 EURMain bearing, generator side11ES-WH2 · H-01
312Pitch sensor—IE-WH1 · C2-07
€ 4.10Bolt M36 × 220124096PT-WH1 · D4-11

After: one format per columnText starts on one line, numbers end on one line, two decimals in every cost, the unit and the currency in the header.

PartLocationOn handReservedUnitUnit cost (€)
Gearbox oil filter
P-44120
PT-WH1 · A3-12184pcs86.40
Gear oil, ISO VG 320
P-20951
PT-WH1 · B1-02640120L7.95
Main bearing, generator side
P-10388
ES-WH2 · H-0111pcs18,450.50
Pitch sensor
P-31007
IE-WH1 · C2-0700pcs312.00
Bolt M36 × 220
P-55210
PT-WH1 · D4-111,24096pcs4.10
The same five stock lines from Gale's parts table, before and after. Read the "Unit cost" column in each: in the second table the thousands and the decimals line up, so the €18,450.50 bearing stands out before you read a single digit. That needs right alignment and figures of equal width (tabular figures).Gale, Cabo Alto Energia and every number in it are fictional. Diagram: Marcus Andrey, CC BY 4.0.

The rule is old and it works: text aligns left, numbers align right. GOV.UK: "When comparing columns of numbers, align the numbers to the right in table cells" (GOV.UK Design System, Table).

Why: text is read from its start, so starts should line up. Numbers are compared by size, and size shows at the end: units under units, tens under tens. A right-aligned column of costs is a rough bar chart before anyone reads it.

Three details make it work:

  • Tabular figures. Many fonts draw digits at different widths, so "1" is narrower than "8". Tabular figures are digits that all have the same width, so columns line up. In CSS it is one line, font-variant-numeric: tabular-nums. Check that your font has them.
  • The same number of decimals in every row of a column. 86.4 and 7.95 don't line up; 86.40 and 7.95 do.
  • The header aligns like its data. A right-aligned column with a left-aligned header looks like the header belongs to the column next to it.

What counts as a number? Anything people compare by size: quantities, costs, hours, percentages. Codes made of digits, like part numbers or phone numbers, are text. Nobody asks if P-44120 is bigger than P-10388.

Dates are the in-between case. Gale's dates have the same shape in every row ("3 Dec 2026, 08:00"), so they line up either way; Gale keeps them left, like text, and the hours column right.


3. One format per column

In the "before" table in the figure, the cost column has €86.4, 7.95, 18450.5 EUR and € 4.10. Each was typed by someone different. Decide once, per column:

  • Units and currency go in the header, not in every cell: "Unit cost (€)", "Est. hours". The cells keep only the number, so they line up and read faster. If one column mixes units (litres and pieces), give the unit its own column, as Gale does.
  • Thousands separators from four or five digits up, so 18,450.50 reads at a glance (the exact rule depends on the language; section 4).
  • Fixed decimals where precision matters: money always has two. Hours have one (6.0, 4.5). Counts of pieces have none.
  • Empty is not zero. 0 on hand means the warehouse counted and there are none: the pitch sensor is out of stock. An empty cell means nobody knows. A dash (—) means the value doesn't apply. Pick one meaning for each, and if you show "Not set" (as Gale does for a work order with no planned start), say it in words.

These choices belong to the column, not to the screen. Write them in the spec next to each column name, so the developer doesn't have to guess and the next table uses the same ones. Handoff to developers has more on that.


4. Numbers and dates in the reader's language

Gale runs in English, Portuguese and Spanish, for sites in Portugal, Spain and Ireland. The same number is written differently in each. This is what the built-in formatter in browsers and Node.js, Intl.NumberFormat (it "enables language-sensitive number formatting", MDN), returned when I checked on 25 November 2026:

Value English (Ireland) Portuguese (Portugal) Spanish (Spain)
The main bearing's unit cost €18,450.50 18 450,50 € 18.450,50 €
One day of a turbine down (Gale's fictional €1,500) €1,500.00 1500,00 € 1500,00 €
3 December 2026, short date 03/12/2026 03/12/26 3/12/26
The same date, medium 3 Dec 2026 03/12/2026 3 dic 2026

Look at the second row: in Portuguese and Spanish, a four-digit number gets no thousands separator. And in American English the short date comes out as 12/3/26, which a reader in Lisbon takes for 12 March. So:

  • Never build number and date formats by hand. Use the platform's formatter with the person's language, and test with a real value from each.
  • Write the month as a word in tables people share across countries ("3 Dec 2026"). It costs four characters and removes the doubt.
  • Exports are different. A file going to Excel or another system wants one fixed format, such as 2026-12-03 (the international ISO 8601 order: year, month, day). Say so in the export dialog.

Time zones. Cabo Alto's sites are in three time zones: Europe/Lisbon, Europe/Madrid and Europe/Dublin. Madrid is one hour ahead of the other two. A work order's planned start is shown in the site's time, because that is when the crew climbs. When a planner in Porto looks at a Spanish site, add the zone next to the time ("09:15 Madrid"), or she will send a crew an hour late.


5. Width, wrapping and truncation

Columns fight for width. Some rules that hold in most tables:

  • Never cut identifiers or numbers. WO-2026-018… and 18,45… are worse than useless. Give these columns the width they need and stop them wrapping.
  • Let short text wrap to two lines, like "Generator bearing swap". Two-line rows are fine; a row that grows to five lines is a sign the text belongs in the detail view.
  • Truncate long free text (notes, descriptions) with an ellipsis (…), and make the full text reachable: in the row's detail, or by widening the column. A tooltip on hover alone doesn't work on a touch screen or from the keyboard.
  • Let people resize and hide columns, and remember what they chose. People who use a table all day set it up once and expect it to stay that way.

6. Common mistakes

  • Columns in database order, with the fields nobody compares taking the best places.
  • Centred numbers, or numbers left-aligned "to match the rest".
  • Digits of different widths, so the columns wobble.
  • The unit or currency repeated in every cell, sometimes in three different ways.
  • Zero, empty and "not applicable" shown the same way.
  • Dates as 03/12/26 in a product used in more than one country.
  • A planned start shown in the planner's time zone instead of the site's.
  • Truncated identifiers, with the full value only in a hover tooltip.

7. Vocabulary

Term Meaning
Stock line One row of the parts table: one part in one stock location
Bin The numbered shelf space in a warehouse where a part is kept
Tabular figures Digits that all have the same width, so numbers line up in columns
Thousands separator The mark between groups of three digits: a comma, a dot or a space, depending on the language
Locale A language plus a region (Portuguese in Portugal, English in Ireland) that decides how numbers and dates are written
ISO 8601 The international date format, year-month-day: 2026-12-03
Time zone The region whose clock a time is in, such as Europe/Madrid
Truncation Cutting text that doesn't fit and showing an ellipsis (…)

8. Try it (no tools needed)

Find a table with at least four columns: a bank statement, an invoice, a timesheet at work.

  1. Write the column names in a row across a sheet of paper.
  2. Under each, write text or number (a number is something people compare by size). Then write how it should align: left or right.
  3. For each number column, write its format: decimals, thousands separator, where the unit goes.
  4. Mark every place the real table breaks your rules: a centred number, a unit in every cell, a missing decimal.
  5. Write the date from the table as a reader in another country would read it. Does it still mean the same day?

You did it well if every column has a type, an alignment and (for numbers) a format, and you found at least one place where the real table breaks them. If you found none, look again at the header alignment and the empty cells.

Reflection questions: Which column would you hide by default, and who would miss it? What does an empty cell mean in this table, and does everyone who reads it agree?


9. If you already practise

  • Keep a column spec next to each table design: name, type, alignment, format, empty value, wrap or truncate, minimum width, who sees it by default. It turns a dozen review comments into one document.
  • Put the formats in the design system as rules, not as examples: "money: two decimals, currency in the header, formatter with the user's locale".
  • Test with ugly real data: the longest task name in the database, the biggest cost, a zero, a missing value, a site in another time zone.
  • Read The domain's words and a glossary again before naming columns. The column header is the glossary's most visible page.

Checklist

Learn more

Books, courses and videos to go deeper

Book links go to Amazon. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.

Anatomy of a data table · Sort, filter and search · The domain's words and a glossary · Handoff to developers · Many companies, many sites · Redesign a dense table

Saved only on this device.

↑ ↓ to move · Enter to open · Esc to close