Learn how to create professional tables in LaTeX with this comprehensive guide. Whether you’re writing academic papers, technical documentation, or reports, mastering LaTeX tables is essential for presenting data clearly and professionally.

Key concept: Tables in LaTeX consist of two main components: the table environment (float container) and the tabular environment (actual table content).

Related topics: Mathematical matrices | Figure positioning | Cross-referencing tables

What You’ll Learn

  • ✅ Basic table structure with tabular environment
  • ✅ Column alignment and formatting options
  • ✅ Professional tables with booktabs package
  • ✅ Multi-column and multi-row cells
  • ✅ Decimal alignment for numeric data
  • ✅ Table captions and cross-references
  • ✅ Advanced formatting techniques

Basic Table Structure

Simple Tabular Environment

\documentclass{article}
\begin{document}

% Basic table without float
\begin{tabular}{lcr}
Left & Center & Right \\
1 & 2 & 3 \\
4 & 5 & 6
\end{tabular}

% With horizontal lines
\begin{tabular}{|l|c|r|}
\hline
Name & Age & Score \\
\hline
Alice & 25 & 95 \\
Bob & 30 & 87 \\
Carol & 28 & 92 \\
\hline
\end{tabular}

\end{document}

Rendered output:

For the first code block (basic table without float):
LeftCenterRight
123
456

• Column 1 (l): Text aligns to the left
• Column 2 (c): Text centers in the column
• Column 3 (r): Text aligns to the right

For the second code block (with horizontal lines):
NameAgeScore
Alice2595
Bob3087
Carol2892

\hline: Creates horizontal lines above and below rows
| in column spec: Creates vertical lines between columns
{|l|c|r|}: Left, center, right columns with vertical separators

Column Specifications

SpecifierAlignmentDescription
lLeftLeft-aligned column
cCenterCentered column
rRightRight-aligned column
p{width}JustifiedParagraph column with fixed width
``Vertical line
@{...}Custom column separator
% Various column types
\begin{tabular}{lcrp{3cm}}
Left & Center & Right & Paragraph text that wraps \\
\end{tabular}

% Custom spacing
\begin{tabular}{l@{\hspace{2cm}}r}
Name & Value \\
\end{tabular}

% Remove default spacing
\begin{tabular}{@{}lcr@{}}
No space & on & sides \\
\end{tabular}

Rendered output:

Paragraph column with text wrapping:
LeftCenterRightParagraph text that wraps within the specified width
Custom spacing between columns:
NameValue
No default spacing (@lcr@):
No spaceonsides

Table Float Environment

Basic Table with Caption

\documentclass{article}
\usepackage{caption}
\begin{document}

\begin{table}[htbp]
  \centering
  \caption{Student grades}
  \label{tab:grades}
  \begin{tabular}{lcc}
    \hline
    Student & Midterm & Final \\
    \hline
    Alice & 85 & 92 \\
    Bob & 78 & 88 \\
    Carol & 92 & 95 \\
    \hline
  \end{tabular}
\end{table}

As shown in Table \ref{tab:grades}, all students improved.

\end{document}

Rendered output:

Table 1: Student grades
StudentMidtermFinal
Alice8592
Bob7888
Carol9295

As shown in Table 1, all students improved.

\caption: Adds a numbered caption above the table
\label: Creates a reference label for cross-referencing
\centering: Centers the table within the page
[htbp]: Float placement options (here, top, bottom, page)

Table Positioning

% Positioning options
\begin{table}[h]    % Here
\begin{table}[t]    % Top of page
\begin{table}[b]    % Bottom of page
\begin{table}[p]    % Page of floats
\begin{table}[htbp] % Try here, top, bottom, page

% Force exact placement
\usepackage{float}
\begin{table}[H]    % HERE exactly

Lines and Rules

Horizontal Lines

\documentclass{article}
\usepackage{booktabs} % For professional tables
\begin{document}

% Basic lines
\begin{tabular}{lcc}
\hline
Header 1 & Header 2 & Header 3 \\
\hline
Data 1 & Data 2 & Data 3 \\
\hline
\end{tabular}

% Professional tables with booktabs
\begin{tabular}{lcc}
\toprule
Header 1 & Header 2 & Header 3 \\
\midrule
Data 1 & Data 2 & Data 3 \\
Data 4 & Data 5 & Data 6 \\
\bottomrule
\end{tabular}

% Partial horizontal lines
\begin{tabular}{lcr}
Full line \\
\hline
Partial & line & below \\
\cline{2-3}
Only & under & these \\
\end{tabular}

\end{document}

Rendered output:

Basic lines with \hline:
Header 1Header 2Header 3
Data 1Data 2Data 3
Professional tables with booktabs:
Header 1Header 2Header 3
Data 1Data 2Data 3
Data 4Data 5Data 6

Note the improved spacing and varying line weights

Partial horizontal lines with \cline:
Full line
Partiallinebelow
Onlyunderthese

\cline draws a line only under columns 2 and 3

Best practice: Use the booktabs package for professional-looking tables. It provides better spacing and line weights than standard LaTeX rules.

Vertical Lines

% Single vertical lines
\begin{tabular}{l|c|r}
Left & Center & Right \\
\end{tabular}

% Double vertical lines
\begin{tabular}{l||c||r}
Left & Center & Right \\
\end{tabular}

% Mixed lines
\begin{tabular}{|l|c|r|}
\hline
A & B & C \\
\hline
1 & 2 & 3 \\
\hline
\end{tabular}

Rendered output:

Tables with vertical lines:
LeftCenterRight
LeftCenterRight
ABC
123

Note: Vertical lines are generally discouraged in professional tables. They can make tables look cluttered and harder to read.

Column Formatting

Text Alignment and Width

\documentclass{article}
\usepackage{array} % Enhanced column types
\begin{document}

% Fixed width columns
\begin{tabular}{p{3cm}p{3cm}p{3cm}}
This is a paragraph column & 
Text wraps automatically & 
Within the specified width \\
\end{tabular}

% Array package column types
\begin{tabular}{>{\bfseries}l c >{\itshape}r}
Bold & Normal & Italic \\
Left & Center & Right \\
\end{tabular}

% Centered fixed-width columns
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\begin{tabular}{C{3cm}C{3cm}}
Centered & Fixed Width \\
\end{tabular}

\end{document}

Rendered output:

Array package column formatting:
BoldNormalItalic
LeftCenterRight
Custom centered fixed-width columns:
CenteredFixed Width

Multi-column Cells

\begin{tabular}{lcr}
\hline
\multicolumn{3}{c}{Spanning Three Columns} \\
\hline
Left & Center & Right \\
A & B & C \\
\multicolumn{2}{l}{Span two} & Right \\
\hline
\end{tabular}

% Complex headers
\begin{tabular}{lcc}
\hline
\multicolumn{1}{c}{Item} & 
\multicolumn{2}{c}{Measurements} \\
\cline{2-3}
& Length & Width \\
\hline
Box A & 10 cm & 5 cm \\
Box B & 15 cm & 8 cm \\
\hline
\end{tabular}

Rendered output:

Multi-column spanning:
Spanning Three Columns
LeftCenterRight
ABC
Span twoRight
Complex headers with partial lines:
ItemMeasurements
LengthWidth
Box A10 cm5 cm
Box B15 cm8 cm

Multi-row Cells

\documentclass{article}
\usepackage{multirow}
\begin{document}

\begin{tabular}{lcc}
\hline
\multirow{2}{*}{Category} & Value 1 & Value 2 \\
& 10 & 20 \\
\hline
\multirow{3}{*}{Group A} & Item 1 & 100 \\
& Item 2 & 200 \\
& Item 3 & 300 \\
\hline
\end{tabular}

% With width specification
\begin{tabular}{lp{3cm}c}
\hline
\multirow{2}{3cm}{Long text that needs wrapping} & 
Description & Value \\
& More info & 42 \\
\hline
\end{tabular}

\end{document}

Rendered output:

Multi-row cells example:
CategoryValue 1Value 2
1020
Group AItem 1100
Item 2200
Item 3300

Numeric Alignment

Decimal Alignment

\documentclass{article}
\usepackage{siunitx} % For numeric alignment
\begin{document}

% Using siunitx S column
\begin{tabular}{l S[table-format=3.2]}
\hline
Item & {Value} \\
\hline
Product A & 12.5 \\
Product B & 123.45 \\
Product C & 1.234 \\
\hline
\end{tabular}

% Multiple numeric columns
\begin{tabular}{l *{3}{S[table-format=2.1]}}
\hline
Test & {Run 1} & {Run 2} & {Run 3} \\
\hline
A & 9.5 & 10.2 & 9.8 \\
B & 12.1 & 11.9 & 12.3 \\
C & 8.7 & 8.9 & 8.8 \\
\hline
\end{tabular}

\end{document}

Rendered output:

Decimal alignment with siunitx:
ItemValue
Product A  12.5 
Product B123.45
Product C  1.234
Notice how decimal points align vertically
Multiple numeric columns:
TestRun 1Run 2Run 3
A9.510.29.8
B12.111.912.3
C8.78.98.8

Currency and Units

\usepackage{siunitx}

% Currency alignment
\begin{tabular}{l S[table-format=4.2, table-space-text-pre=\$]}
\hline
Item & {Price} \\
\hline
Laptop & \$1299.99 \\
Mouse & \$29.95 \\
Keyboard & \$89.50 \\
\hline
Total & \$1419.44 \\
\hline
\end{tabular}

% Units in headers
\begin{tabular}{l S[table-format=3.1]}
\hline
Material & {Density (\si{g/cm^3})} \\
\hline
Water & 1.0 \\
Iron & 7.9 \\
Gold & 19.3 \\
\hline
\end{tabular}

Rendered output:

Currency alignment with dollar signs:
ItemPrice
Laptop$1299.99
Mouse   $29.95
Keyboard   $89.50
Total$1419.44
Scientific units in headers:
MaterialDensity (g/cm³)
Water1.0
Iron7.9
Gold19.3

Coloring Tables

Row and Cell Colors

\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}

% Alternating row colors
\begin{tabular}{lcc}
\rowcolor{gray!20}
Header 1 & Header 2 & Header 3 \\
Row 1 & Data & Data \\
\rowcolor{gray!10}
Row 2 & Data & Data \\
Row 3 & Data & Data \\
\rowcolor{gray!10}
Row 4 & Data & Data \\
\end{tabular}

% Individual cell colors
\begin{tabular}{lcc}
\hline
Normal & \cellcolor{yellow}Highlighted & Normal \\
\cellcolor{red!20}Light red & Normal & \cellcolor{blue!20}Light blue \\
\hline
\end{tabular}

% Column colors
\begin{tabular}{>{\columncolor{gray!20}}l cc}
Gray column & Normal & Normal \\
\end{tabular}

\end{document}

Rendered output:

Alternating row colors:
Header 1Header 2Header 3
Row 1DataData
Row 2DataData
Row 3DataData
Row 4DataData
Individual cell coloring:
NormalHighlightedNormal
Light redNormalLight blue

Professional Striped Tables

\usepackage[table]{xcolor}
\usepackage{booktabs}

% Define alternating colors
\rowcolors{2}{white}{gray!10}

\begin{tabular}{lcc}
\toprule
\rowcolor{gray!40}
Product & Quantity & Price \\
\midrule
Apples & 10 & \$5.00 \\
Oranges & 15 & \$7.50 \\
Bananas & 20 & \$4.00 \\
Grapes & 5 & \$6.00 \\
\bottomrule
\end{tabular}

Rendered output:

Professional striped table with booktabs:
ProductQuantityPrice
Apples10$5.00
Oranges15$7.50
Bananas20$4.00
Grapes5$6.00

Table Width Control

Full Width Tables

\documentclass{article}
\usepackage{tabularx}
\begin{document}

% Using tabularx
\begin{tabularx}{\textwidth}{lXr}
\hline
Left & Expanding middle column & Right \\
\hline
A & This column expands to fill available space & 100 \\
B & Automatically adjusts width & 200 \\
\hline
\end{tabularx}

% Multiple X columns
\begin{tabularx}{\textwidth}{|X|X|X|}
\hline
Equal & Width & Columns \\
\hline
These three columns & share the available & space equally \\
\hline
\end{tabularx}

% Custom width distribution
\begin{tabularx}{\textwidth}{l>{\hsize=.5\hsize}X>{\hsize=1.5\hsize}Xr}
Fixed & Narrow & Wide expanding column & Fixed \\
\end{tabularx}

\end{document}

Rendered output:

Full-width table with expanding column:
LeftExpanding middle column that fills available spaceRight
AThis column expands to fill available space100
BAutomatically adjusts width200
Equal width columns spanning full width:
EqualWidthColumns
These three columnsshare the availablespace equally

Resizing Tables

\usepackage{graphicx}

% Scale to specific width
\resizebox{\textwidth}{!}{%
\begin{tabular}{lcccccc}
\hline
Many & Columns & That & Would & Be & Too & Wide \\
\hline
Data & Data & Data & Data & Data & Data & Data \\
\hline
\end{tabular}
}

% Scale to fit column width
\resizebox{\columnwidth}{!}{%
\begin{tabular}{lcr}
% Table content
\end{tabular}
}

% Scale by percentage
\scalebox{0.8}{%
\begin{tabular}{lcr}
% 80% of original size
\end{tabular}
}

Rendered output:

Table resized to fit text width (many columns):
ManyColumnsThatWouldBeTooWide
DataDataDataDataDataDataData

Note: This table would normally overflow the page margins, but resizebox scales it to fit

Table scaled to 80% of original size:
LeftCenterRight

Scalebox maintains aspect ratio while reducing overall size

Table Design Principles

Professional Table Design Guidelines

Creating professional tables in LaTeX requires attention to both technical implementation and design principles. Here are the key guidelines that will elevate your table design:

Clarity First

Tables should communicate data clearly. Avoid unnecessary decorations that distract from the content.

Consistent Formatting

Use consistent number formats, alignment, and styling throughout your document.

Appropriate Spacing

Proper spacing makes tables more readable. Use \arraystretch or booktabs for better spacing.

Meaningful Headers

Clear, descriptive headers help readers understand your data structure immediately.

When to Use Tables vs Other Formats

Not all data belongs in a table. Consider these alternatives:

Data TypeBest FormatWhen to Use
Few data pointsInline textWhen you have 2-3 values that can be mentioned in a sentence
Trends over timeLine graphWhen showing how values change over a continuous variable
ProportionsPie/bar chartWhen showing parts of a whole or comparing categories
Complex relationshipsDiagramWhen showing connections or flow between elements
Structured listsTablesWhen comparing multiple attributes across items

Advanced Table Techniques

Creating Publication-Quality Tables

Professional journals often have specific requirements for tables. Here’s how to meet common standards:

\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{threeparttable}
\usepackage[font=small,labelfont=bf]{caption}

\begin{document}

\begin{table}[htbp]
\centering
\small % Reduce font size for journal requirements
\caption{Comparison of experimental results across different conditions}
\label{tab:results}
\begin{threeparttable}
\begin{tabular}{@{}lS[table-format=3.1]S[table-format=2.1]S[table-format=1.3]@{}}
\toprule
Condition & {Temperature (\si{\celsius})} & {Time (h)} & {Yield} \\
\midrule
Control\tnote{a} & 25.0 & 2.0 & 0.850 \\
Optimized\tnote{b} & 35.5 & 1.5 & 0.923 \\
Modified & 30.2 & 1.8 & 0.891 \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\footnotesize
\item[a] Standard laboratory conditions
\item[b] Conditions optimized through preliminary experiments
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}

Rendered output:

Table 1: Comparison of experimental results across different conditions
ConditionTemperature (°C)Time (h)Yield
Controla25.02.00.850
Optimizedb35.51.50.923
Modified30.21.80.891

a Standard laboratory conditions
b Conditions optimized through preliminary experiments

Dynamic Table Generation from External Data

For reproducible research, generating tables from data files is essential:

\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{booktabs}
\usepackage{filecontents}

% Create sample data file
\begin{filecontents*}{data.csv}
Sample,Temperature,Pressure,Result
A,25.3,101.2,Pass
B,26.1,102.5,Pass
C,24.8,99.8,Fail
D,25.7,101.9,Pass
\end{filecontents*}

\begin{document}

% Basic CSV import
\pgfplotstabletypeset[
  col sep=comma,
  string type,
  every head row/.style={
    before row=\toprule,
    after row=\midrule
  },
  every last row/.style={
    after row=\bottomrule
  }
]{data.csv}

% Advanced formatting
\pgfplotstabletypeset[
  col sep=comma,
  string type,
  columns={Sample,Temperature,Result}, % Select specific columns
  column type/.add={}{}, % Clear default column types
  columns/Sample/.style={column name=\textbf{Sample ID}},
  columns/Temperature/.style={
    column name=\textbf{Temp. (\si{\celsius})},
    fixed,
    precision=1
  },
  columns/Result/.style={
    column name=\textbf{Status},
    postproc cell content/.code={
      \ifstrequal{##1}{Pass}
        {\pgfkeysalso{@cell content=\textcolor{green!60!black}{##1}}}
        {\pgfkeysalso{@cell content=\textcolor{red!60!black}{##1}}}
    }
  }
]{data.csv}

\end{document}

Rendered output:

Basic CSV import:
SampleTemperaturePressureResult
A25.3101.2Pass
B26.1102.5Pass
C24.899.8Fail
D25.7101.9Pass
Advanced formatting with column selection and styling:
Sample IDTemp. (°C)Status
A25.3Pass
B26.1Pass
C24.8Fail
D25.7Pass

Accessibility in Tables

Making Tables Screen-Reader Friendly

While LaTeX primarily produces PDF output, considering accessibility improves document usability:

\documentclass{article}
\usepackage{booktabs}
\usepackage{array}

% Define column type for headers
\newcolumntype{H}{>{\bfseries}l}

\begin{document}

% Use semantic markup
\begin{table}[htbp]
\caption{Student enrollment by department and year}
\label{tab:enrollment}
\centering
\begin{tabular}{H*{4}{r}}
\toprule
Department & \textbf{2021} & \textbf{2022} & \textbf{2023} \\
\midrule
Computer Science & 245 & 289 & 312 \\
Mathematics & 156 & 162 & 171 \\
Physics & 98 & 103 & 99 \\
Chemistry & 134 & 141 & 139 \\
\midrule
\textbf{Total} & \textbf{633} & \textbf{695} & \textbf{721} \\
\bottomrule
\end{tabular}
\end{table}

% Alternative text description
\begin{quote}
\textit{Table description: This table shows student enrollment numbers across four science departments from 2021 to 2023, with totals for each year. Overall enrollment increased from 633 to 721 students.}
\end{quote}

\end{document}

Rendered output:

Accessible table with semantic markup:
Table: Student enrollment by department and year
Department202120222023
Computer Science245289312
Mathematics156162171
Physics9810399
Chemistry134141139
Total633695721

Table description: This table shows student enrollment numbers across four science departments from 2021 to 2023, with totals for each year. Overall enrollment increased from 633 to 721 students.

Troubleshooting Complex Tables

Common Table Problems and Solutions

Performance Optimization for Large Tables

Handling Tables with Thousands of Rows

\documentclass{article}
\usepackage{longtable}
\usepackage{array}

% Optimize compilation for large tables
\usepackage{etoolbox}
\AtBeginEnvironment{longtable}{\small}

\begin{document}

% For very large datasets, consider:
% 1. External processing
% 2. Pagination
% 3. Summary tables

\begin{longtable}{@{}lrrr@{}}
\caption{Large dataset with automatic page breaks} \\
\toprule
ID & Value A & Value B & Result \\
\midrule
\endfirsthead

\multicolumn{4}{c}{\tablename\ \thetable\ -- \textit{Continued}} \\
\toprule
ID & Value A & Value B & Result \\
\midrule
\endhead

\midrule
\multicolumn{4}{r}{\textit{Continued on next page}} \\
\endfoot

\bottomrule
\endlastfoot

% Generate sample data
\newcount\rowcount
\rowcount=1
\loop
  \the\rowcount & \number\numexpr\rowcount*2\relax & 
  \number\numexpr\rowcount*3\relax & 
  \number\numexpr\rowcount*5\relax \\
  \advance\rowcount by 1
\ifnum\rowcount<100 \repeat

\end{longtable}

\end{document}

Rendered output:

Table: Large dataset with automatic page breaks
IDValue AValue BResult
1235
24610
36915
481220
5101525
… (continues for 100 rows)
Continued on next page

Note: longtable automatically handles page breaks and continues headers on each page

Best Practices

Table design guidelines:

  1. Simplicity: Less is more - avoid excessive lines and decoration
  2. Alignment: Right-align numbers, left-align text
  3. Spacing: Use adequate white space for readability
  4. Captions: Place captions above tables (convention)
  5. Consistency: Use the same style throughout your document
  6. Booktabs: Use \toprule, \midrule, \bottomrule for professional appearance
  7. Width: Avoid tables wider than text width

Common Issues and Solutions

Troubleshooting tables:

  1. Table too wide: Use tabularx, \small, or rotate the table
  2. Text not wrapping: Use p{width} columns instead of l, c, or r
  3. Vertical alignment: Use [t], [c], or [b] with p columns
  4. Missing package errors: Load required packages (array, booktabs, etc.)
  5. Spacing issues: Adjust \arraystretch or use \renewcommand{\arraystretch}{1.2}

Comparison with Other Table Tools

LaTeX Tables vs Word/Excel Tables

Understanding when to use LaTeX tables versus other tools:

FeatureLaTeXWordExcel
PrecisionExact controlLimitedGood for calculations
ConsistencyExcellentManualGood within sheet
Math supportNativeLimitedBasic
AutomationScriptableLimitedVBA/Macros
Version controlText-basedBinaryBinary
Learning curveSteepGentleModerate

Converting Tables Between Formats

% Converting Excel data to LaTeX
% Option 1: Use excel2latex plugin
% Option 2: Export as CSV and use pgfplotstable
% Option 3: Use online converters

% Example using datatool package
\usepackage{datatool}
\DTLloaddb{mydata}{data.csv}

\begin{tabular}{lrr}
\toprule
\DTLforeach{mydata}{%
  \name=Name,\value=Value,\status=Status}{%
  \name & \value & \status \\
}
\bottomrule
\end{tabular}

Rendered output:

Example using datatool to import CSV data:
NameValueStatus
Product A125Active
Product B89Pending
Product C203Active

This table was automatically generated from CSV data

Real-World Table Examples

Financial Reports

\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{xcolor}

\begin{document}

\begin{table}[htbp]
\centering
\caption{Quarterly Financial Summary (in millions)}
\begin{tabular}{l*{4}{S[table-format=4.1]}S[table-format=+3.1]}
\toprule
{Revenue Stream} & {Q1} & {Q2} & {Q3} & {Q4} & {Change (\%)} \\
\midrule
Product Sales & 125.4 & 132.7 & 141.2 & 156.8 & +25.0 \\
Services & 45.2 & 47.8 & 49.1 & 52.3 & +15.7 \\
Licensing & 12.3 & 11.9 & 13.2 & 14.1 & +14.6 \\
\midrule
\textbf{Total Revenue} & 182.9 & 192.4 & 203.5 & 223.2 & +22.0 \\
\midrule
Operating Expenses & 89.2 & 91.5 & 94.8 & 98.2 & +10.1 \\
\midrule
\textbf{Net Income} & \textbf{93.7} & \textbf{100.9} & \textbf{108.7} & \textbf{125.0} & 
  \textcolor{green!60!black}{\textbf{+33.4}} \\
\bottomrule
\end{tabular}
\end{table}

\end{document}

Rendered output:

Table: Quarterly Financial Summary (in millions)
Revenue StreamQ1Q2Q3Q4Change (%)
Product Sales125.4132.7141.2156.8+25.0
Services 45.2 47.8 49.1 52.3+15.7
Licensing 12.3 11.9 13.2 14.1+14.6
Total Revenue182.9192.4203.5223.2+22.0
Operating Expenses 89.2 91.5 94.8 98.2+10.1
Net Income93.7100.9108.7125.0+33.4

Scientific Data Tables

\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{multirow}

\begin{document}

\begin{table}[htbp]
\centering
\caption{Experimental measurements with uncertainties}
\begin{tabular}{
  l
  S[table-format=2.3(1)]
  S[table-format=3.2(2)]
  S[table-format=1.4(1)]
}
\toprule
{Sample} & {Mass (\si{\gram})} & {Volume (\si{\milli\liter})} & {Density (\si{\gram\per\cubic\centi\meter})} \\
\midrule
Water (control) & 10.000(5) & 10.02(3) & 0.9980(8) \\
Solution A & 12.345(8) & 11.23(5) & 1.0990(12) \\
Solution B & 15.678(10) & 13.45(8) & 1.1658(15) \\
\multirow{2}{*}{Solution C} & 18.234(12) & 15.12(10) & 1.2061(18) \\
& \multicolumn{3}{c}{\textit{Measurement repeated due to anomaly}} \\
\bottomrule
\end{tabular}
\end{table}

\end{document}

Rendered output:

Table: Experimental measurements with uncertainties
SampleMass (g)Volume (mL)Density (g/cm³)
Water (control)10.000 ± 0.00510.02 ± 0.030.9980 ± 0.0008
Solution A12.345 ± 0.00811.23 ± 0.051.0990 ± 0.0012
Solution B15.678 ± 0.01013.45 ± 0.081.1658 ± 0.0015
Solution C18.234 ± 0.01215.12 ± 0.101.2061 ± 0.0018
Measurement repeated due to anomaly

Quick Reference

Essential Commands

CommandPurpose
\hlineHorizontal line
\cline{i-j}Partial horizontal line
\multicolumn{n}{format}{text}Span n columns
\multirow{n}{width}{text}Span n rows
&Column separator
\\Row separator
\caption{}Table caption
\label{}Reference label

Column Types Summary

l              % left-aligned
c              % centered  
r              % right-aligned
p{3cm}         % paragraph, fixed width
|              % vertical line
@{text}        % custom separator
>{decl}col     % apply declaration to column
<{decl}        % apply declaration after column

Next: Learn about Advanced table features including complex layouts, long tables, and professional formatting techniques. Also explore Mathematical matrices for similar structured layouts.