Skip to main content
v2026.11,986 entries · CC-BY 4.0

LaTeX Table: Center Cell Content Vertically

How to center LaTeX table cells vertically with m{} columns, makecell and multirow, with a situation-to-tool table and troubleshooting.

Written and maintained by CASRAI Editorial Board

Published · Last updated

On this page

To center text vertically in a LaTeX table cell, load the array package and use an m{width} column type; for a single cell use \makecell[c]{...}, and for a cell spanning rows use multirow, which centers by default. This guide is for researchers and analysts typesetting results tables who find that multi-line cells hug the top of the row.

What it is used for in research

Results tables often mix one-line numbers with multi-line labels, such as a wrapped variable description next to a coefficient. In a standard p{width} column the text is aligned at the top of the cell, so the numbers sit level with the first line of the label rather than the middle. Vertical centering fixes this without changing the table layout. The same techniques apply whether you write tables by hand or paste output from statistical software into a LaTeX document (see matrices in LaTeX for a related layout task).

Install or access (official source only)

All three tools are free LaTeX packages distributed through CTAN, the Comprehensive TeX Archive Network. Load what you use in the preamble:

\usepackage{array}      % m{} and b{} column types
\usepackage{makecell}   % makecell
\usepackage{multirow}   % multirow

The package documentation is on CTAN: array (documentation version 2.7b, revised 2026/06/26 when read), makecell and multirow.

Step-by-step: center cell content vertically

Which tool fits which situation

Situation Use Source
Every cell in a column should be vertically centered m{width} column type (needs array) Overleaf Tables; array documentation
One multi-line cell \makecell[c]{Line one \\ Line two} makecell documentation
A cell that spans several rows \multirow{3}{4em}{text}; the default vertical position is [c], centered multirow documentation; Overleaf Tables
One-line cells look cramped against horizontal lines \setlength{extrarowheight}{1pt} array documentation

1. Center a whole column with m{width}

  1. Add \usepackage{array} to the preamble.
  2. Replace the column specifier with m{width}. Overleaf documents p{width} as top-aligned, m{width} as aligned in the middle and b{width} as aligned at the bottom, with m and b requiring array.
\begin{tabular}{ | m{5em} | m{1cm} | m{1cm} | }
  \hline
  cell1 dummy text dummy text dummy text & cell2 & cell3 \\
  \hline
\end{tabular}

This follows the example on the Overleaf Tables page, where m{5em} centers the text in the middle of the cell. The array documentation describes these columns as equivalent to \parbox of the given width: p corresponds to \parbox[t]{width}, with m and b as the middle and bottom variants.

2. Center horizontally as well

To center the text horizontally inside an m column, insert declarations with >{...}. Because \centering redefines the row-ending command, restore it with \arraybackslash, which the array documentation describes as restoring \\ for use in array and tabular environments after commands such as \raggedright:

\begin{tabular}{ | >{\centering\arraybackslash}m{3cm} | m{3cm} | }

3. Center one multi-line cell with makecell

The makecell package provides \makecell[alignment]{text}, where the vertical letters are t, b and c. Use \\ inside the braces for line breaks:

\makecell[c]{Line one \\ Line two}

For a cell with a predefined width, the makecell documentation shows vertical alignment through a grouped column specifier, for example [c{p{3cm}}], or a double group {{m{3cm}}} for vertical centering and {{b{3cm}}} for bottom alignment.

4. Center a cell spanning rows with multirow

Load multirow, write the spanning cell in its first row and leave the cells below it empty:

\multirow{3}{4em}{Multiple row} & cell2 & cell3 \\
 & cell5 & cell6 \\
 & cell8 & cell9 \\

The multirow syntax is \multirow[vpos]{nrows}[bigstruts]{width}[vmove]{text}. Its documentation states that vpos sets the vertical position of the text in the block and that the default, [c], vertically centers it, so no extra option is needed for centering.

Output and how to read it

After compiling, a correctly centered cell has equal space above and below its text within the row. Check three things:

  • Row height. Per the array documentation, m-cells are supposed to be vertically centered within the table row. If numbers still look tight against a rule, add extrarowheight, a positive length added to the normal height of every row (depth unchanged); the documentation example is \setlength{extrarowheight}{1pt}. The documentation also notes that m-cells position their content manually, so extrarowheight is ignored during their vertical alignment.
  • The t and b option on tabular is not cell centering. The optional position argument of tabular places the whole table relative to the surrounding text baseline. By default the environment is centered on that baseline. It does not align text inside cells.
  • Horizontal alignment. Vertical centering does not center the text horizontally; use step 2 for that.

Troubleshooting

  • LaTeX does not accept the m column type. Overleaf notes that m and b require the array package; confirm \usepackage{array} is in the preamble.
  • Row endings break after adding centering in a column. Add \arraybackslash after it, as in step 2, so \\ still ends the row.
  • multirow or makecell is undefined. Load multirow or makecell in the preamble; they are separate packages from array.
  • Spacing from \\[...] looks different. Per the array documentation, since version 2.4f the optional-argument space of \\ is added after centering.

Free alternatives (all are CTAN packages)

Package Vertical centering mechanism Applies to
array m{width} column type Whole columns of fixed width
makecell \makecell[c]{...} Individual multi-line cells
multirow multirow with default [c] Cells spanning several rows

For related layout questions, see centering in LaTeX, spacing in LaTeX and including graphics in LaTeX.

FAQ

How do I vertically center text in a LaTeX table cell?

Load array and declare the column as m{width}. For one cell, use \makecell[c]{...}.

What is the difference between p, m and b columns?

Per Overleaf, p{width} aligns text at the top of the cell, m{width} in the middle and b{width} at the bottom; m and b need the array package.

Does multirow center vertically?

Yes. Its documentation says the default [c] vertically centers the text in the multirow block.

Does the position option on tabular center cell content?

No. The tabular position argument positions the whole table relative to the surrounding baseline.

Sources (official documentation)

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about LaTeX Table: Center Cell Content Vertically

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →