Skip to content

Bar Graph Maker – Create a Bar Chart Online

Updated:

Paste your data and turn it into a clean bar chart — grouped, stacked or 100% stacked, vertical or horizontal — with custom colors, labels and SVG/PNG export.

Turn Your Data into a Bar Chart

Input Fields
Chart options
0 hides the gridlines; tick labels stay at “nice” round values.
%
Empty space between category groups, as a share of one category slot (0% = bars touch).
If enabled, the result will update automatically when you change any value.

Bar Graph Formula

Formula
\[ T_i = \sum_{j=1}^{m} v_{ij} \]

Where:

  • \(v_{ij}\) — the value of series \(j\) in category \(i\) (e.g. Sales in April)
  • \(T_i\) — row total: the sum of all series values in category \(i\)
  • \(m\) — number of series (up to 5)

Every bar's length is proportional to its value and anchored at the zero line. In a stacked layout the bar reaches the row total \(T_i\); in a 100% stacked layout each segment is drawn as the share \(p_{ij} = \frac{v_{ij}}{T_i} \times 100\%\), so every bar fills the entire axis and only the composition is visible.

Bar Graph – Calculation Example

Example: with the default data (Sales and Costs for Jan–May), set Bar layout to “Stacked” and look at April.

\[ T_{\text{Apr}} = 180 + 130 = 310 \]

\[ p_{\text{Sales}} = \frac{180}{310} \times 100 \approx 58.1\%, \qquad p_{\text{Costs}} \approx 41.9\% \]

Result: April's stacked bar reaches 310, with Sales contributing 58.1% and Costs 41.9%. Across the whole period Sales total 745 and Costs 545, a grand total of 1,290.

How to Use the Calculator

  1. In Data — category and values, type or paste one line per category: the category name, then up to 5 series values. The first line can be a header with the series names, e.g. Month, Sales, Costs. Commas, semicolons and tabs all work, so you can paste straight from a spreadsheet.
  2. Enter a Chart title, then choose the Orientation (Vertical bars or Horizontal bars) and the Bar layout (Grouped, Stacked or 100% stacked).
  3. Fill in the Category axis label and Value axis label. With Custom value-axis range checked, set the Axis minimum and Axis maximum yourself; uncheck it and the axis starts at 0 (or at the data when negative values are present) and extends just past the tallest bar or stack.
  4. Adjust the look of the chart: Gridline intervals (0 hides the gridlines), Value labels on bars, Legend position, Sort categories, Color palette and Bar gap.
  5. Hover over any bar for an exact-value tooltip. Use the Copy data as CSV, Download SVG and Download PNG buttons under the chart to export your work.

What a Bar Graph Shows

A bar graph (or bar chart) compares a numeric value across categories with rectangles whose length is proportional to the value. Each category — a month, a product, a country or a survey answer — gets its own slot on the category axis, and the value axis shows the measured amount. Because the axis is anchored at zero, the eye can compare lengths directly, which makes bar charts one of the most reliable charts for reading exact differences.

The layout controls what comparison the chart emphasizes. Grouped bars place the series side by side within each category, which is best when you want to compare individual values — for example, Sales against Costs month by month. Stacked bars pile the series on top of each other, so the bar's full length is the row total \(T_i\) and the segments give a rough sense of composition. 100% stacked bars rescale every category to the same full length, showing only each value's percentage share \(p_{ij}\).

Orientation matters too. Vertical bars suit time series and short category names, reading left to right like a timeline. Horizontal bars give long labels room to breathe and make rankings easy to scan from top to bottom. If you want to show how one single total breaks down into parts rather than compare across categories, the Pie Chart Maker is the better tool.

Choosing the Right Layout

Layout Best for Watch out for
Grouped Comparing each series side by side within a category Gets crowded with more than 4–5 series
Stacked Category totals plus a rough sense of composition Middle segments are hard to compare across categories
100% stacked Shares of a whole when the totals are similar Absolute differences between categories disappear

Tips and Limitations

  • The calculator accepts up to 30 categories and 5 series, with values within ±1 trillion. If a series has more than one column of data, missing cells are read as 0.
  • Number formats are flexible: 1200, 1,200, 1 200 and even 12,5 (European decimal comma) are all understood, as are currency symbols and percent signs.
  • By default the value axis starts at 0, which is the honest choice for bars — a truncated axis exaggerates small differences. Use the custom range only when you have a reason and label the axis clearly.
  • 100% stacked bars need non-negative values and a positive row total in every category; otherwise the percentages are undefined.
  • Charts shown to others should use the Okabe–Ito palette for colour-blind readers, or Grayscale (print) for printed documents.
  • Value labels are skipped automatically where they would not fit — hover the bars for exact values instead, or read the data table below the chart.
  • Everything is computed in your browser; nothing is uploaded. Before charting, you may want to summarise the raw variable with the Median and Mode calculator or check its spread with the Quartile calculator.

Frequently Asked Questions

How do I create a bar graph by hand without a tool?

Draw a horizontal axis for your categories and a vertical axis for values, starting the value axis at 0. Give each category an equal-width slot, and draw a rectangle whose height is proportional to its value: for a value of 180 with a scale of 1 unit = 1 mm, the bar is 180 mm tall. Label both axes, add a title, and space the bars evenly. This calculator automates all of that — you just paste the numbers.

Why should the value axis of a bar chart start at zero?

Because bar charts are read by comparing the lengths of the rectangles. If the axis starts at, say, 90 instead of 0, a bar of 180 looks more than twice as long as a bar of 100, exaggerating the difference and misleading the reader. Line charts tolerate truncated axes; bar charts do not. Only use the custom range here when you have a clear reason, and state the axis bounds openly.

When should I use horizontal bars instead of vertical ones?

Use horizontal bars when your category names are long (country names, survey responses, product titles), because vertical bars force long labels to be truncated or rotated. Horizontal bars also make rankings easy to scan top-to-bottom, especially with the “Largest total first” sort. Vertical bars are the default for time series — Jan, Feb, Mar — where left-to-right reading matches the flow of time.

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

A bar graph compares values across distinct categories with gaps between the bars. A histogram shows the distribution of a continuous variable grouped into bins, and adjacent bars touch because the bins are consecutive intervals. If your “categories” are actually numeric ranges like 0–10, 10–20, 20–30, a histogram is the right chart, not this tool.

How do I show percentages instead of absolute values?

Set the Bar layout to “100% stacked”: every bar is rescaled to the same full length, and each segment becomes its share of the row total, \( p_{ij} = \frac{v_{ij}}{T_i} \times 100\% \). You can also keep a grouped layout and switch Value labels to “Percent of row total”, which labels the bars with shares while keeping their real lengths. Note that 100% stacked bars hide differences in category totals.

Can the chart handle negative values?

Yes, in grouped and stacked layouts negative values draw below the zero line, and by default the axis extends to the smallest negative value. In stacked layout, positives stack upward from zero and negatives stack downward, so the bar's full span is the net total. 100% stacked layout is the exception — shares of a whole are undefined with negative numbers, so the calculator requires non-negative data there.

How do I get my chart into a document, slide or spreadsheet?

Use the export buttons under the chart: Download SVG for a crisp vector file that scales perfectly in print and presentation software, or Download PNG for an image rendered at double resolution with a white background. To reuse the raw data elsewhere, click Copy data as CSV and paste it straight into Excel or Google Sheets.

Leave a Reply

Your email address will not be published. Required fields are marked *