LaTeX Table Generator

Figran

Paste a results table and get clean, compile-ready LaTeX code.

  • Paste from Excel
  • Decimal alignment
  • Booktabs and table notes

Table editor

Select cells with Shift and click, or Shift and arrow keys.

Table style

Table preview

Approximate typeset preview

Baseline characteristicsBaseline characteristicsVariableControlTreatmentp valueAge, years54.3 ± 8.252.8 ± 7.90.340Female, n (%)32 (53.3)35 (58.3)0.580BMI, kg/m²24.8 ± 3.125.2 ± 2.90.470Smoker, n (%)12 (20.0)10 (16.7)0.640CRP, mg/L3.2 ± 1.15.8 ± 2.3<0.001

LaTeX code

% \usepackage{booktabs}
% \usepackage{siunitx}
\begin{table}[htbp]
\centering
\sisetup{uncertainty-mode=separate}
\setlength{\belowcaptionskip}{6pt}
\caption{Baseline characteristics}
\begin{tabular}{l S[table-format=2.1(2)] S[table-format=2.1(2)] S[table-format=<1.3]}
\toprule
Variable & {Control} & {Treatment} & {p value} \\
\midrule
Age, years & 54.3 \pm 8.2 & 52.8 \pm 7.9 & 0.340 \\
Female, n (\%) & {32 (53.3)} & {35 (58.3)} & 0.580 \\
BMI, kg/m\ensuremath{^{2}} & 24.8 \pm 3.1 & 25.2 \pm 2.9 & 0.470 \\
Smoker, n (\%) & {12 (20.0)} & {10 (16.7)} & 0.640 \\
CRP, mg/L & 3.2 \pm 1.1 & 5.8 \pm 2.3 & <0.001 \\
\bottomrule
\end{tabular}
\end{table}

LaTeX table examples

Start with a results table similar to yours, then replace the illustrative data.

Baseline characteristicsBaseline characteristicsVariableControlTreatmentp valueAge, years54.3 ± 8.252.8 ± 7.90.340Female, n (%)32 (53.3)35 (58.3)0.580BMI, kg/m²24.8 ± 3.125.2 ± 2.90.470Smoker, n (%)12 (20.0)10 (16.7)0.640CRP, mg/L3.2 ± 1.15.8 ± 2.3<0.001

Baseline characteristics

Compare baseline measurements across two groups.

6 rows · 4 columns

Regression resultsRegression resultsVariableModel 1Model 2Model 3Age0.021**0.018*0.015(0.007)(0.008)(0.009)Treatment-0.342***-0.298***-0.271**(0.081)(0.084)(0.092)Female0.1120.098(0.074)(0.075)Constant1.204***1.087***0.964**…
11 rows

Regression results

Compare model coefficients with standard errors beneath.

11 rows · 4 columns

Grouped headersGrouped headersOutcomeControlTreatmentMeanSDMeanSDScore A42.15.446.84.9Score B18.32.720.12.4Score C7.21.28.11.1

Grouped headers

Place two measures beneath each group heading.

5 rows · 5 columns

Subgroups with multirowSubgroups with multirowGroupSubgroupEstimateAgeUnder 500.8550 or older0.92SexFemale0.78Male0.89

Subgroups with multirow

Group related rows under a shared label.

5 rows · 3 columns

Long table across pagesLong table across pagesMeasurementMeanSDMeasure 112.001.00Measure 212.231.03Measure 312.461.06Measure 412.691.09Measure 512.921.12Measure 613.151.15Measure 713.381.18…
56 rows

Long table across pages

Keep a longer set of measurements in one table.

56 rows · 3 columns

Model comparisonModel comparisonModelAccuracyF1 scoreLogistic regression0.812 ± 0.0210.791 ± 0.025Random forest0.854 ± 0.0180.839 ± 0.020Gradient boosting0.872 ± 0.0150.861 ± 0.017Neural network0.866 ± 0.0190.852 ± 0.022

Model comparison

Compare mean scores and highlight the best value.

5 rows · 3 columns

How to make a LaTeX table

Create a LaTeX table online in four steps, starting with a spreadsheet.

  1. 1

    Paste your data

    Copy cells from Excel or import a CSV file.

  2. 2

    Check column types

    Choose text, centered or decimal-aligned number columns.

  3. 3

    Set the style

    Add a caption and notes, then choose the table rules.

  4. 4

    Use the code

    Copy the table and required packages into Overleaf or your document.

How a LaTeX table works

A table in TeX combines a column specification with rows of cells.

The tabular environment defines the columns. Ampersands separate cells, while the double backslash ends a row. Booktabs adds horizontal rules.

\begin{tabular}{lr}
\toprule
Variable & Control \\
\midrule
Age, years & 54.3 \\
\bottomrule
\end{tabular}
VariableVariableControlAge, years54.3

Required packages

The code panel lists the packages needed for the selected options. Add them to your document preamble.

Aligning numbers in a table

Decimal alignment makes values easier to compare.

Text columns align at an edge; siunitx S columns align numeric values at the decimal point. Headers and non-numeric entries are protected as text.

Left
1.2
12.345
123
<0.01
Right
   1.2
12.345
   123
 <0.01
Decimal
  1.2
 12.345
123
 <0.01

LaTeX table FAQ

How do I make a table in LaTeX?

Use a tabular environment to define columns and rows. This generator writes it for you and lists the required packages.

How do I convert an Excel table to LaTeX without the Excel2LaTeX add-in?

Copy cells in Excel and paste them into the editor, or import a CSV or XLSX file. Excel2LaTeX is another option available as an add-in.

Which packages do I need?

The package list depends on your options. For example, booktabs provides horizontal rules and siunitx aligns numbers.

How do I merge cells with multirow and multicolumn?

Select a rectangular group of cells and choose Merge selection. The generated code uses multirow or multicolumn as needed.

How do I align numbers at the decimal point?

Choose Number for the column to use siunitx decimal alignment.

What if my table is too wide?

Choose column width, wrap text, or use a landscape page. Review legibility after compiling.

How can a long table in LaTeX span pages?

Turn on Long table across pages to use the longtable package. Scaled tables cannot break across pages.

Can I use this table in Overleaf or Beamer?

Yes. Copy the code and required packages into your project. Beamer slides have less space, so check the table width and use a normal tabular rather than longtable.

Is my table uploaded?

No. Editing and generation run in your browser, and the draft is stored only for the current browser session.

How do I center a table in LaTeX?

Tables are centered by default with the centering command.

How do I change row spacing in a LaTeX table?

Set the arraystretch factor to 1.2 before the table to increase row spacing.

How do I convert CSV to LaTeX or make multiline cells?

Import a CSV or paste a table from Word or Google Sheets. Line breaks within cells are preserved in the generated LaTeX table.

How do I add table notes with threeparttable?

Enter notes in the table notes field. The generated code includes threeparttable or threeparttablex for a long table.

Make your table

Turn your results into LaTeX code ready for your paper.

Make your table