DATA VISUALIZATION · CHART SELECTION

A line graph connects ordered data points with a line to show how a value changes across a sequence, usually time. A bar chart uses separate bars to compare values across categories. So the short answer is this: use a line graph when the order of the x-axis matters and the trend is the point; use a bar chart when each category or period stands on its own and you want readers to compare sizes.

The two charts overlap more than most guides admit. You can plot sales by month with either one, and both will be "correct." What changes is the sentence a reader walks away with. A line says "it climbed, dipped, then climbed again." Bars say "June was the biggest month." This guide shows the same dataset both ways, gives you a quick decision test, and covers the cases that cause real confusion: time on a bar chart, categories on a line, truncated axes and combo charts. It belongs to our wider data visualization guides, and if you are still weighing other chart families, start with how to choose a chart type.

Line Graph vs Bar Chart at a Glance

  • Line graph Ordered x-axis (time, distance, dose); shows trend, direction and turning points
  • Bar chart Separate categories or periods; shows which value is bigger and by how much
  • Baseline Bars should start at zero; a labeled line graph does not have to
  • Many points Dozens of time points read better as a line; dozens of bars get crowded
  • Categories Never join unordered categories with a line
  • Both together A combo chart works when one series is an amount and the other is a rate
Two panels with the same monthly website visits, one drawn as a line graph and one as a bar chart
The same six values, drawn two ways. The numbers are hypothetical.

What Is a Line Graph?

A line graph, also called a line chart, plots a point for each observation and joins neighboring points with straight segments. The x-axis is ordered: days, months, years, temperature steps, distance along a road. The y-axis holds a numeric measure. Because the segments imply that something happens between two points, the chart suits values that really do change continuously, such as a stock price, a temperature or a patient's blood pressure.

You read a line graph by slope. A steep segment means fast change, a flat one means stability, and a reversal marks a turning point. With several lines on one chart you can also compare trends, for example revenue in three regions over twelve months. If you want to build one, our free line graph maker and the step-by-step guide on how to make a line graph cover the mechanics.

What Is a Bar Chart?

A bar chart draws one rectangle per category, with length proportional to the value. The categories can be products, regions, survey answers or age groups. Bars can run vertically (often called a column chart) or horizontally. Readers compare them by length, which our eyes do very accurately when the bars share a baseline.

Bar charts handle a wider range of questions than line graphs. They rank categories, show totals per period, and display counts or frequencies. Long category names fit better on a horizontal bar chart. For the mechanics, see how to make a bar graph and the bar chart maker. The vertical-versus-horizontal question has its own page: bar chart vs column chart.

Key Differences Between a Line Graph and a Bar Chart

Line graph versus bar chart
FeatureLine graphBar chart
Main jobShow change across an ordered sequenceCompare values across separate categories
X-axisOrdered or continuous (time, distance)Categories, or discrete periods
What the eye readsSlope and position of pointsLength of each bar
Zero baselineOptional if the axis is labeledExpected
Many data pointsHandles dozens or hundredsGets crowded past roughly 12 to 15 bars
Several seriesSeveral lines, easy to compare trendsGrouped or stacked bars, harder with many series
Typical examplesDaily temperature, monthly traffic, stock priceSales by region, votes by candidate, errors by type

The "12 to 15 bars" figure is a working rule of thumb, not a standard. It depends on chart width and label length. The point is that bars need room, and lines do not.

Same Data, Two Charts: What Changes?

Take six months of website visits, in thousands (hypothetical): Jan 120, Feb 135, Mar 128, Apr 160, May 172, Jun 190. Total growth from January to June is 70 thousand, or about 58%. March slipped by 7 thousand from February (about 5%), and April jumped by 32 thousand, a 25% rise on March.

On the line graph, the March dip and the April surge are the first things you notice, because the slope changes. On the bar chart, the dip is still there but it is a small difference between two neighboring bars, and your eye goes to the tall June bar. Neither picture is wrong. If your message is "traffic is accelerating," use the line. If it is "June was our best month," use the bars.

  • +58%Jan to Jun growth
  • −5%Feb to Mar dip
  • +25%Mar to Apr jump

You can test this yourself: paste the same six numbers into the line graph maker and the bar chart maker and see which one makes your point faster.

When to Use a Line Graph

Pick a line graph when most of these are true:

  • The x-axis has a natural order. Time is the classic case, but distance, depth, dosage or temperature work as well.
  • You care about direction, speed or turning points, not just the size of each value.
  • There are many observations. Daily data over a year is 365 points. As bars, that is unreadable; as a line, it is a clean shape.
  • You want to compare trends. Two to five lines on one chart let a reader see which series is rising faster.
  • The measure is continuous, so the value plausibly exists between two observations (temperature, price, weight).

Line graphs are also the usual choice for seasonality, forecasts versus actuals and before-and-after comparisons, which is why they dominate analysis dashboards and KPI trackers such as the ones in our KPI examples.

When to Use a Bar Chart

Pick a bar chart when most of these are true:

  • The x-axis is categories with no inherent order, such as products, countries, departments or survey answers.
  • You want to rank or compare sizes. Sort the bars from largest to smallest and the ranking is immediate.
  • Each value is a total or count for a period, not a point on a continuous curve (sales this quarter, tickets closed this week).
  • There are few categories or periods. Four quarters, or eight regions, fit comfortably.
  • Exact differences matter. Equal baselines let readers judge small gaps by length.

Bars also show frequencies. If your x-axis is numeric ranges rather than categories, you may actually need a histogram; the difference is covered in histogram vs bar graph. To compare parts of a whole, a pie chart is the other common option, though bars are usually easier to read.

Can a Bar Chart Show Time?

Yes. Many charts of yearly or quarterly totals use bars, and nobody is confused. Design guidance from Morningstar's chart team puts it simply: line charts stress trends, bar charts stress quantities, and a series with weak ties between neighboring values can suit bars better (Morningstar Design System). Observable's chart team makes a related point: time is technically continuous, so lines are the default, but bars are fine when each period is a separate bucket (Observable).

A bar chart over time works best when:

  • each bar is a total or count for the period (monthly orders, yearly rainfall),
  • there are about a dozen periods or fewer,
  • the point is to compare periods, such as "which quarter was biggest," and
  • the values do not flow smoothly into each other, like annual awards or yearly election turnout.

Switch to a line when you have a long series, when readers need to see the shape of the movement, or when the value is a snapshot (a price at close, a temperature at noon) rather than a sum over the period.

Can a Line Graph Show Categories?

You can draw it, but you usually should not. Joining categories like Apples, Oranges and Pears with a line implies a progression from one to the next, and there is none. The slope between two categories means nothing, and reordering the categories changes the "trend." Observable's team shows this with letter frequencies: the line version turns into visual noise, and the bar version reads cleanly. Storytelling with Data takes a similar view and recommends bars for categorical data (Storytelling with Data).

Five fruit categories joined by a zigzag line next to the same values as sorted bars
A line through unordered categories suggests a sequence that does not exist. Sorted bars show the ranking.

There is one fair exception. If your categories are ordered, such as age bands (18–24, 25–34, 35–44) or satisfaction levels from "very low" to "very high," a line can work because the order is real. Even then, bars are usually the safer choice.

A Quick Decision Checklist

  1. Look at the x-axis. If it is a list of unordered categories, use a bar chart and stop.
  2. Name the message. Write the takeaway in one sentence. If it contains words like "rose," "fell," "trend" or "accelerated," lean toward a line.
  3. Count the points. Past about a dozen, bars get crowded; a line scales better.
  4. Check what each value is. A total or count for a period fits bars. A snapshot or rate fits a line.
  5. Check the baseline. If the interesting variation sits far above zero, a line graph with a labeled axis may show it; bars would hide it or mislead.
  6. Plot both and compare. If one looks like noise, or all bars look the same height, use the other.
Flowchart with three questions leading to a bar chart or a line graph
The checklist as a flow. It is a guide, not a law; edge cases exist.

Few Data Points vs Many Data Points

Data volume is a practical tiebreaker. With three to eight points, either chart works and bars often look cleaner. With 20 or more, bars start to merge into a wall of color and labels collide, while a line stays readable even at hundreds of points. If you have a long time series and still want a sense of individual period totals, consider a line with markers on the key points, or aggregate to months or quarters before plotting.

The same logic applies to the number of series. Three lines on one chart are easy to follow. Three grouped bars across twelve months are 36 rectangles. For that case, lines (or small multiples) are usually clearer.

Zero Baselines and Truncated Axes

This is where the two charts truly differ. A bar is read by its length, so if the axis starts at 90 instead of 0, the bars no longer represent proportional values. Datawrapper, for instance, blocks bar and column charts with a non-zero baseline because truncated bars are widely considered deceptive (Datawrapper Academy). A line is read by the position of its points, so many practitioners accept a non-zero range on a line graph if the axis is clearly labeled.

Three bars with values 92, 95 and 98 on an axis starting at 90 beside the same bars on a zero-based axis
With a base of 90, C looks four times as tall as A. With a base of 0, it is about 6.5% taller.

That said, this is a debated area. Research cited by Observable found people can misread truncated line charts too, so a tight line axis still deserves a label and a sanity check. If you need to show small differences between large numbers, consider plotting the change or the percentage difference instead. More traps like this are listed in common data visualization mistakes.

Comparing Several Series

For comparing groups across time, the choice depends on the question. Grouped bars answer "who was highest in each period?" Multiple lines answer "who is trending up?" Stacked bars answer "how did the total and its parts change?" but they make the middle segments hard to compare because they do not share a baseline. If readers must compare more than a handful of series across more than a handful of periods, lines are normally easier, with distinct colors and direct labels instead of a legend.

Combining Bars and a Line: Combo Charts

When you have an amount and a rate on the same timeline, such as revenue and gross margin, one chart can carry both. Bars show the amounts, a line shows the rate, and a secondary axis handles the different scale. Flourish suggests the same split on dashboards: a line for overall growth and bars for comparing performance across regions or teams (Flourish).

Light blue bars for monthly revenue with an orange line for gross margin on a right-hand axis
Bars for the amount, a line for the rate. Each axis is labeled and color-matched to its series.

Use combo charts sparingly. Two scales on one plot make it easy to imply a relationship that is only an artifact of how the axes were stretched. Keep to two series, label both axes, and avoid using it when a pair of small stacked charts would be clearer. If you suspect two measures move together, test that with a scatter plot instead.

How to Switch Between Line and Bar Charts in Excel, Sheets and Python

Excel. Select your data, choose Insert, then pick a line or column chart. To switch, select the chart and use Design, then Change Chart Type. For a combo chart, open the same dialog, choose Combo, and pick Clustered Column – Line on Secondary Axis, as described in Microsoft's support article. Excel users who start from raw data may also like our guide to pivot tables, which prepares monthly totals quickly.

Google Sheets. Select the data, choose Insert, then Chart. In the chart editor's Setup tab, change the chart type between line chart, column chart and combo chart. Menu names shift between versions, so check the current interface if yours differs.

Python (matplotlib). The two charts are one function apart:

import matplotlib.pyplot as plt

months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
visits = [120, 135, 128, 160, 172, 190]

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 4))
ax1.plot(months, visits, marker="o")   # line graph
ax2.bar(months, visits)                # bar chart
ax2.set_ylim(bottom=0)                 # keep the bar baseline at zero
plt.show()

If you would rather not write code, upload a CSV to AmriData's data visualization features and compare the charts side by side.

Line Graph vs Bar Graph in School and Science Labs

Students meet this question in math, science and statistics classes, usually with the word "graph" instead of "chart." The two words mean the same thing here. A common classroom rule is based on the independent variable, the one you choose or control. If it is a set of categories (types of fertilizer), use a bar graph. If it is numeric and continuous (hours of sunlight, temperature), use a line graph. HHMI's BioInteractive lab notebook guide frames the choice the same way (HHMI BioInteractive).

When you describe a graph in writing, state what the axes show, name the overall pattern, and give two or three specific values. For a line, mention the highest point, the lowest point and any sharp change. For bars, name the largest and smallest categories and the gap between them. Tell the reader the unit, and never leave the title off.

Common Line vs Bar Chart Mistakes

  • Joining unordered categories with a line. It suggests a trend that is not there.
  • Starting bars above zero. The visual ratios no longer match the numbers.
  • Using bars for a very long time series. Hundreds of thin bars hide the shape.
  • Too many lines. Past five or six, the chart becomes a plate of spaghetti; highlight one or split into panels.
  • Missing data drawn as a continuous line. A gap in the data should look like a gap, not a straight segment across it.
  • Stretching a combo chart's second axis until two unrelated series appear to move together.
  • Unsorted bars. Unless categories have a natural order, sort by value.
  • Choosing by habit. Ask what the reader should conclude, then choose the chart that makes it easiest.

Practice Questions With Answers

1. Sales for five regions in one quarter. Which chart?

Bar chart. The regions are separate categories with no order, and the goal is comparison.

2. Daily high temperature for 30 days. Which chart?

Line graph. Days are ordered, there are many points, and temperature is continuous.

3. Revenue for four quarters, where the goal is "which quarter was biggest." Which chart?

Bar chart. Four period totals compared by size. A line would also work if the goal were the trend.

4. Plant height measured every day for six weeks. Which chart?

Line graph. It is a continuous measure over ordered time, with 42 observations.

5. How many students chose each of six lunch options?

Bar chart, sorted from most to least popular.

6. Monthly revenue and gross margin on the same timeline. Which chart?

Combo chart: bars for revenue, a line for margin on a secondary axis, with both axes labeled.

Try Both Charts on Your Own Data

The quickest way to settle the choice is to look at both. Upload or paste your numbers into the line graph maker and the bar chart maker, then ask which one answers your question faster. Related tools: column chart maker for vertical bars, histogram maker for distributions, and scatter plot maker for relationships between two numeric variables. For sales numbers specifically, see sales data analysis.

Frequently Asked Questions About Line Graphs and Bar Charts

What is the main difference between a line graph and a bar chart?

A line graph shows how a value changes across an ordered sequence such as time. A bar chart compares values across separate categories. One emphasizes trend, the other emphasizes size.

When should I use a line graph instead of a bar chart?

Use a line graph when the x-axis is ordered, you have many data points, and the message is about direction, speed or turning points.

Which is better for time series data?

Line graphs are the usual default because they show shape well across many periods. Bars suit a small number of period totals, such as four quarters or five years.

Can a bar chart show change over time?

Yes. Bars can show totals per period. They are less effective for long series or for judging smooth movement.

Can a line graph show categories?

It can, but it is rarely a good idea for unordered categories because the line implies a sequence. Use bars unless the categories have a real order.

Is a line graph the same as a line chart?

Yes. "Graph" and "chart" are used interchangeably in everyday writing. The same applies to bar graph and bar chart.

Does a bar chart have to start at zero?

It should. Bars are read by length, so a non-zero baseline distorts comparisons. A labeled line graph has more freedom.

How many bars are too many?

There is no fixed limit, but readability usually suffers beyond roughly a dozen or so vertical bars. Horizontal bars handle more categories because labels have room.

Can I combine a line and a bar chart?

Yes, with a combo chart. It works best for an amount plus a rate, such as revenue and margin, with a labeled secondary axis.

How do I change a bar chart to a line chart in Excel?

Select the chart, open Design, choose Change Chart Type, and pick a line chart. For a mix, choose Combo and set each series type.

What is the difference between a bar chart and a histogram?

A bar chart compares categories. A histogram groups a numeric variable into ranges to show its distribution. Our histogram vs bar graph guide covers it in detail.

Which chart should students use in a science report?

Use a line graph when the independent variable is numeric and continuous, and a bar graph when it is a set of categories.

Key Takeaways

  • Line graphs show trend; bar charts show comparison. Decide which message matters.
  • Use bars for categories and a small number of period totals; use lines for ordered, continuous or long series.
  • Bars need a zero baseline. A labeled line graph can use a tighter range.
  • Do not join unordered categories with a line.
  • A combo chart can show an amount and a rate together, but label both axes.
  • When unsure, plot both and keep the one that makes your point faster.

Bottom line: The right chart is the one that lets a reader reach the correct conclusion without help. For more chart guidance, browse the full data visualization category.

Further Reading and Sources