Ressourcen
Zurück

Mit der automatisierten Datenfluss-Engine von Domo wurden Hunderte von Stunden manueller Prozesse bei der Vorhersage der Zuschauerzahlen von Spielen eingespart.

Schau dir das Video an
Über
Zurück
Auszeichnungen
Recognized as a Leader for
31 consecutive quarters
Two G2 badges side by side: left one labeled Fall 2025 Leader with layered orange and red stripes at the bottom, right one labeled Milestone Users Love Us with three red stars below.
Frühling 2025 Marktführer in den Bereichen Embedded BI, Analyseplattformen, Business Intelligence und ELT-Tools
Preise

Histogram Charts: Types, Examples, and How to Create

Data is everywhere, but raw numbers on a spreadsheet often hide the true story. To make sense of it all, you need a way to see the patterns, trends, and outliers that matter. This is where a histogram chart becomes an essential tool. It transforms columns of data into a clear visual story, revealing the shape and spread of your information at a glance.

This guide will walk you through everything you need to know about histograms. We’ll define what they are, explain when to use them, and show you how to create and interpret them effectively. Whether you're in finance, manufacturing, or marketing, understanding histograms will help you make smarter, data-driven decisions.

What is a histogram chart?

A histogram is a graphical representation that organizes a group of data points into a series of specified ranges. In simple terms, it’s a chart that shows the frequency distribution of a set of continuous data. It looks similar to a bar chart, but the two serve different purposes.

Histogram of 30 student exam scores grouped into ranges from 40–49 up to 90–99.
Histogram showing the distribution of exam scores for a class of 30 students across six score ranges.

Histogram vs bar chart: The key difference

The most common point of confusion is the difference between a histogram and a bar chart. While they both use bars to represent data, their functions are distinct:

  • Histograms are used to plot continuous data—data that can take any value within a range (e.g., height, weight, temperature, or time). The bars in a histogram touch each other to show that the data is continuous across a range. Each bar represents an interval, or “bin.”
  • Bar charts are used to compare categorical data—data that is divided into distinct, separate groups (e.g., countries, types of products, or months of the year). The bars are separate to emphasize that the categories are discrete.

Think of it this way: a histogram shows how many data points fall into different numerical ranges, while a bar chart shows the value of a metric for different categories.

What histograms reveal

At their core, histograms help you understand the underlying distribution of your data set. By looking at a histogram, you can quickly see:

  • Frequency distribution: Where do most of the data points cluster? Are they concentrated in one area or spread out?
  • Shape of the data: Does the data follow a bell curve (a normal distribution), is it skewed to one side, or does it have multiple peaks?
  • Spread and variation: How wide is the range of data? Are the values tightly packed or widely dispersed?
  • Outliers: Are there any unusual data points that sit far away from the main group?

Purpose and when to use a histogram

Histograms are incredibly versatile and serve as a foundational tool for data analysis. You should use one when you want to understand the distribution of a single continuous variable.

Common uses of histograms

  • Understanding spread: A histogram immediately shows the range and concentration of your data. For example, a quality control team can use it to see if the weight of a product consistently falls within an acceptable range.
  • Detecting skewness: It reveals if the data is symmetrical or if it has a long tail on one side (skew). In finance, understanding the skew of investment returns can help assess risk.
  • Identifying patterns and outliers: A histogram can highlight strange patterns, such as multiple peaks (bimodal distribution) or gaps in the data. It also makes outliers—values far from the norm—easy to spot.

Industries and contexts

Histograms are valuable across many fields:

  • Manufacturing and quality control: To monitor if a manufacturing process is stable and within specification limits. For example, charting the diameter of machine parts.
  • Finance: To analyze the distribution of stock returns, price fluctuations, or credit scores to assess risk.
  • Healthcare: To study the distribution of patient vitals like blood pressure, cholesterol levels, or recovery times.
  • Marketing: To understand the distribution of customer ages, purchase amounts, or time spent on a website.

When are histograms not ideal?

While powerful, histograms aren’t always the best choice. Avoid them when:

  • Working with small sample sizes: With too few data points, a histogram can be misleading and may not accurately represent the true underlying distribution.
  • Analyzing categorical data: If you are comparing discrete categories, a bar chart is often the appropriate tool.
  • Comparing many distributions: While you can overlay a few histograms, comparing many datasets on one chart becomes cluttered. A box plot might be a better alternative.

How a histogram works: The mechanics

To properly read a histogram, you need to understand its fundamental components: bins.

Bins are the intervals that group the data. Imagine you have the test scores for 100 students. Instead of plotting 100 individual points, you can group them into bins: 0-10, 11-20, 21-30, and so on. The number of scores that fall into each bin determines the height of its corresponding bar.

  • Frequency and bar height: The height of each bar represents the frequency (or count) of data points within that bin. Taller bars indicate a higher concentration of data in that range.
  • Effect of bin count and range: The number and width of histogram bins are critical. This choice can dramatically change the story the chart tells.
    • Too few bins: If the bins are too wide, you might lose important details and smooth over patterns like multiple peaks. The chart becomes too general.
    • Too many bins: If the bins are too narrow, the chart can look noisy and chaotic. Small fluctuations can be mistaken for significant trends, obscuring the overall shape of the data.

Finding the right bin size is a balance between detail and clarity.

Key components of a histogram

Every well-made histogram includes several key parts that make it easy to understand.

  • X-axis: This horizontal axis represents the continuous variable you are measuring. It’s divided into the bins, or intervals.
  • Y-axis: This vertical axis represents the frequency or count of observations within each bin. It can also represent a percentage (relative frequency) or density.
  • Bars (Bins): The bars represent the data intervals. Their width corresponds to the bin size, and their height corresponds to the frequency.
  • Title and Labels: A clear title tells the viewer what the histogram is about (e.g., “Distribution of Customer Ages”). Axis labels should clearly state what is being measured and include units (e.g., “Age in Years” and “Number of Customers”).

Types and variants of histograms

While the standard frequency histogram is most common, several variations offer different perspectives on your data.

  • Frequency histogram: The most common type, where the y-axis shows the raw count of data points in each bin.
  • Cumulative histogram: Each bar represents the cumulative frequency of a bin plus all the bins before it. The last bar will always reach the total number of data points. This is useful for understanding the percentage of data below a certain value (e.g., “What percentage of students scored below 70 percent?”).
  • Density histogram: Instead of frequency, the y-axis shows probability density. The total area of all bars in a density histogram equals 1. This variant is useful for comparing distributions with different sample sizes or for overlaying a probability density function (such as a bell curve).
  • Comparative histograms: You can overlay two or more histograms to compare the distributions of different groups. Using transparency or different colors for each group can help visualize differences in their shape, center, and spread.

How to create a histogram

Creating a histogram can be done with various tools, from simple spreadsheets to advanced programming languages. Here’s a step-by-step guide for each.

Step 1: Choose your bin width

Before you start, you need to decide on the number and width of your bins. While this can be an art, there are statistical formulas to guide you:

  • Sturges’ Rule: This is a common but sometimes simplistic method. Number of bins = 1 + 3.322 * log(N), where N is the number of data points.
  • Freedman–Diaconis Rule: This rule is a more robust method, especially for skewed or large data sets. Bin width = 2 * (IQR) / N^(1/3), where IQR is the interquartile range.

Most modern tools automatically select a reasonable bin width, but you should always have the option to adjust it manually to see if a different view reveals new insights.

Path 1: Using spreadsheets (Excel or Google Sheets)

  1. Enter your data: Place all your continuous data in a single column.
  2. Select the data: Highlight the column containing your data.
  3. Insert Chart:
    • In Excel, go to Insert > Insert Statistical Chart > Histogram.
    • In Google Sheets, go to Insert > Chart. In the Chart editor, select Chart type and choose Histogram chart.
  4. Customize bins: Right-click the horizontal axis and select Format Axis. Here, you can change the bin width or the number of bins to adjust the chart's granularity.
  5. Label your chart: Add a clear title and axis labels.

Path 2: Using data and BI tools

Business intelligence (BI) platforms are designed for robust data visualization. The process is generally straightforward:

  1. Connect to your data: Load your data set into the platform.
  2. Select a histogram chart: Drag the histogram chart type onto your dashboard canvas.
  3. Assign data: Drag the continuous data field you want to analyze to the appropriate axis (usually the “Values" or "Measures" field). The tool will automatically generate the histogram.
  4. Adjust and format: Use the formatting options to change bin sizes, colors, and labels to improve clarity.

Path 3: Using code (Python or R)

For more control and reproducibility, you can use programming languages.

Python (with pandas and matplotlib):

import pandas as pd
import matplotlib.pyplot as plt

# Sample data
data = {'scores': [82, 95, 71, 65, 88, 76, 92, 59, 81, 75, 89, 90, 78, 66, 84]}
df = pd.DataFrame(data)

# Create histogram
plt.hist(df['scores'], bins=5, edgecolor='black')

# Add labels and title
plt.title('Distribution of Test Scores')
plt.xlabel('Score')
plt.ylabel('Frequency')

# Show plot
plt.show()

R (with ggplot2):

library(ggplot2)

# Sample data
scores <- c(82, 95, 71, 65, 88, 76, 92, 59, 81, 75, 89, 90, 78, 66, 84)
df <- data.frame(scores)

# Create histogram
ggplot(df, aes(x = scores)) +
 geom_histogram(binwidth = 5, fill = "blue", color = "black") +
 labs(title = "Distribution of Test Scores",
      x = "Score",
      y = "Frequency")

Interpreting a histogram

Once you have your histogram, the next step is to interpret what it tells you. Look for these key characteristics:

  • Shape:
    • Normal (bell-shaped): Symmetrical with a single peak in the middle. This is common in many natural phenomena.
    • Skewed Right (positively skewed): The peak is on the left, with a long tail to the right. This indicates most values are low, but there are a few high-value outliers. (e.g., income distribution).
    • Skewed Left (negatively skewed): The peak is on the right, with a long tail to the left. Most values are high, with a few low-value outliers. (e.g., retirement age).
    • Bimodal: Two distinct peaks, suggesting there may be two different groups mixed in your data. (e.g., restaurant rush hours around lunch and dinner).
    • Uniform: All bins have a similar frequency, creating a flat appearance. This indicates the data is evenly spread across the range.
  • Outliers and clusters: Look for bars that are far from the main group of data. Also, note any significant gaps between bars, which could indicate missing data or distinct subgroups.

Before we move on, a quick note on using histograms for decision-making: A quality control manager might see a skewed histogram and investigate why so many products are falling below the target specification. A marketer might see a bimodal age distribution and decide to create separate campaigns for each age group.

Best practices and design tips

To create effective and honest histograms, follow these guidelines:

  • Choose appropriate bin sizes: Experiment with different bin widths to find the one that best reveals the underlying pattern without being noisy or overly general.
  • Label everything clearly: Ensure your title, x-axis, and y-axis are descriptive. Always include units.
  • Start the y-axis at zero: This prevents distortion and ensures the relative heights of the bars are accurate.
  • Avoid 3D or other clutter: Fancy effects like 3D bars, shadows, or gradients make the chart harder to read accurately. Stick to a simple, 2D design.
  • Provide context: Explain the source of the data, the time period it covers, and what it represents.
  • Use color purposefully: Use color to highlight specific ranges or to compare different datasets on an overlaid histogram. Ensure colors are accessible to people with color vision deficiency.

Limitations and alternatives

Histograms are not without their weaknesses. For instance, they can be misleading. The interpretation is highly dependent on the bin width chosen. Histograms are also sensitive to small data sets. With too little data, the shape of the histogram is not reliable. Lastly, comparing multiple distributions is difficult. Overlapping histograms quickly become unreadable with more than two or three groups.

When a histogram isn't the right fit, consider these alternatives:

  • Box plots: Excellent for comparing the distributions of several groups at once. They clearly show median, quartiles, and outliers.
  • Density plots: A smoothed version of a histogram that is less sensitive to bin width and better for comparing distributions.
  • Violin plots: Combines the features of a box plot and a density plot, showing both the summary statistics and the full distribution shape.
  • Empirical cumulative distribution function (ECDF) plots: Plots each data point and shows the proportion of data less than or equal to that value. It contains all the information without any binning bias.
  • Bar charts: Use these when your data is categorical, not continuous.

Examples and visuals

Imagine you are a designer tasked with creating histograms from data. Here are a few scenarios:

  • Example 1: Normal distribution. You are given the heights of 1,000 adult males. The resulting histogram would likely be bell-shaped, peaking around the average height. You would annotate the center peak as "Average Height (e.g., 5’10”)” and note the symmetrical spread on either side.
  • Example 2: Skewed right distribution. You plot the price of homes in a city. The histogram would be skewed right—a large number of affordable homes create a peak on the left, while a few very expensive luxury homes create a long tail to the right. You would add an annotation pointing to the right tail labeled "High-Value Outliers."
  • Example 3: Bimodal distribution. You chart the times that customers enter a coffee shop over a 24-hour period. The histogram would have two peaks: one around 8:00 am (the morning rush) and another around 3:00 pm (the afternoon break). Your annotation would label these peaks “Morning Peak” and "Afternoon Peak" and suggest analyzing these two customer groups separately.

Key takeaways to histograms

The histogram chart is a fundamental tool for anyone working with data. It provides a quick, intuitive way to understand the distribution of a continuous variable, revealing patterns of concentration, spread, and skewness that raw numbers can't show.

Remember these key points:

  • Use histograms for continuous data and bar charts for categorical data.
  • The number of histogram bins you choose is crucial and can change your interpretation.
  • Pay close attention to the shape of the distribution—normal, skewed, or bimodal—as it tells a story about your data.
  • Always follow design best practices for clarity and honesty.

By mastering the histogram, you add a powerful visualization to your data analysis toolkit. Platforms such as Domo make it easy to create, customize, and share histograms at scale, helping your entire organization move from raw data to actionable insights.

Table of contents
Try Domo for yourself.
Try free

Frequently asked questions

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

A histogram visualizes the frequency distribution of continuous data (e.g., height, temperature), with bars that touch to represent a continuous range. A bar chart compares discrete categories (e.g., sales by country), with separate bars for each category.

How do I choose the right number of bins for my histogram?

While formulas like Sturges’ Rule or the Freedman–Diaconis Rule can provide a starting point, the best approach is often to experiment. Adjust the bin count up and down to see how the visual changes. The goal is to find a balance that clearly reveals the underlying shape without being too noisy or too general.

How should I handle skewed data or outliers in a histogram?

A histogram is excellent for identifying skew and outliers, not hiding them. If you see a long tail (skew) or isolated bars (outliers), it’s a signal to investigate that data further. Ask why those values exist. Is it a data entry error, or does it represent a real, important phenomenon?

What is a good sample size for creating a histogram?

There is no magic number, but generally, histograms become more reliable with at least 30 to 50 data points. With very small samples (e.g., under 20), the shape of the histogram can be misleading and may not reflect the true distribution of the population.

How can I use histograms to compare two or more groups?

You can overlay histograms for different groups on the same chart. Use different, semi-transparent colors for each group. This allows you to visually compare their centers, spreads, and shapes. However, if you need to compare more than two or three groups, a box plot is often a cleaner and more effective alternative.

No items found.
Explore all
No items found.
No items found.