Coderhouse goes global

🌍

Read more

What Is a Histogram? How Data Analysts Read Distributions and Skewness

AI Engineering

Build and ship real applications with LLMs, agents and automation.

8 weeks · Live online · View course →

Data Analytics

Go from zero to job-ready analyst with SQL, Python and BI tools.

10 weeks · Live online · View course →

Dan Patiño

AI Strategy & Innovation at Coderhouse

Data

What Is a Histogram? How Data Analysts Read Distributions and Skewness

What Is a Histogram? How Data Analysts Read Distributions and Skewness

A histogram is a chart that shows how the values of one numeric variable are distributed. It groups values into ranges called bins and draws a bar for each bin, where the bar's height is the number (or share) of observations that fall into that range. With one glance, a histogram tells a data analyst where most values sit, how spread out they are, whether the data is skewed and whether there are unusual values worth investigating.

It matters because averages hide shape. Two datasets can have the same mean and very different stories: one tightly clustered, another split into two groups, another with a long tail of extreme values. Histograms are usually the first chart analysts draw during exploratory data analysis for exactly that reason.

Histogram vs bar chart

They look similar, but they answer different questions:

  • Histogram: shows the distribution of a continuous numeric variable (order values, delivery times, session length). Bins are consecutive numeric ranges, so bars typically touch.

  • Bar chart: compares categories (sales by region, tickets by channel). Categories can be reordered, and bars have gaps between them.

If you can reorder the bars without losing meaning, it is a bar chart, not a histogram.

How to read a histogram

The NIST/SEMATECH e-Handbook of Statistical Methods describes the histogram as a way to summarize the center, spread, skewness, presence of outliers and presence of multiple modes in a dataset. In practice, analysts check four things:

  1. Center: where is the tallest part of the distribution?

  2. Spread: are values packed into a narrow range or spread widely?

  3. Shape: symmetric, skewed to one side, or with more than one peak?

  4. Unusual values: isolated bars far from the rest, or gaps where you expected data.

Common histogram shapes

Symmetric (bell-shaped)

Values cluster around the middle and taper off evenly on both sides. Mean and median are close. Measurement errors and many physical quantities look like this.

Right-skewed (positive skew)

Most values are small, with a long tail to the right. Revenue per customer, order values, income and response times are classic examples. Here the mean is pulled above the median by the tail.

Left-skewed (negative skew)

Most values are high, with a tail to the left. Exam scores on an easy test or product ratings often look like this. The mean falls below the median.

Bimodal or multimodal

Two or more peaks usually mean you are mixing groups: weekday and weekend traffic, two customer segments, two product lines. Split the data and the story often becomes clear.

Uniform

Bars are roughly the same height. Values are spread evenly across the range, as with randomly generated IDs or evenly scheduled events.

What is skewness?

Skewness is a number that measures the asymmetry of a distribution. As the NIST handbook's section on skewness and kurtosis explains, a symmetric distribution has skewness near zero, a positive value indicates a longer right tail and a negative value indicates a longer left tail.

Why analysts care: skewed data changes which summary you should report. For right-skewed metrics like order value, the median is often a better "typical" number than the mean. Percentiles and the interquartile range also describe skewed data more honestly; see our guide to percentiles, quartiles and the IQR.

Choosing the number of bins

Bin width can change what the histogram seems to say:

  • Too few bins hide structure: a bimodal distribution can look like a single hump.

  • Too many bins create noise: every bar looks different and the overall shape disappears.

Practical approach: start with your tool's default, then try a few alternatives. Common rules of thumb include Sturges' rule and the Freedman-Diaconis rule, which uses the IQR to set bin width. Most libraries let you pass these as options. Use bin edges that make business sense when you can, such as $10 order-value buckets or 5-minute delivery windows, so stakeholders can read the chart easily.

How to make a histogram

In Python with pandas

pandas can draw a histogram in one line with DataFrame.hist(), for example df["order_value"].hist(bins=30). Matplotlib and seaborn give you more control over styling and overlays.

In Excel and Google Sheets

Both tools include a built-in histogram chart type: select the numeric column, insert a chart and choose histogram, then adjust bin width or number of bins in the chart settings.

In SQL

You can bucket values directly in the database, for example with FLOOR(order_value / 10) * 10 AS bucket and a COUNT(*) grouped by bucket. This is useful for huge tables where you only want the aggregated counts in your BI tool.

In BI tools

Power BI, Tableau and Looker Studio can build histograms from binned fields, which is handy for dashboards that track how a distribution changes over time.

Using histograms to spot data problems

  • Spikes at round numbers or zero: often default values, manual entry habits or missing data coded as 0.

  • Impossible values: negative ages, durations of several days for a 30-second task.

  • Isolated bars far from the rest: candidate outliers to investigate before you remove anything; our guide on how analysts detect and handle outliers covers next steps.

  • Sudden shape changes between periods: a tracking change, a new customer segment or a pricing change.

FAQ

What is the difference between a histogram and a box plot?

A histogram shows the full shape of a distribution; a box plot summarizes it with the median, quartiles and outliers. Analysts often use both together.

Should a histogram show counts or percentages?

Counts are fine for one dataset. Use percentages or density when comparing groups of different sizes.

Is a histogram only for normal data?

No. Histograms are most useful precisely when you do not know the shape yet, including skewed or multimodal data.

Keep learning with Coderhouse

Reading distributions correctly is a core skill for anyone who turns raw data into decisions. Choose the path that fits you:

Dan Patiño

I'm Dan Patiño, head of AI Strategy & Innovation at Coderhouse. My day-to-day work involves merging the tactical management of e-commerce (CRO, Email Marketing and SEO) with the development of disruptive solutions. I specialize in building internal AI-powered apps to automate tasks and boost innovation within the team. I firmly believe that technology is strategy's best ally. To dive deeper into my professional journey, I'll be waiting for you on my LinkedIn profile.