# Bin

*noun*

say it: **“BIN”** **/ˈbɪn/**

One range of values in a histogram, such as $5 to $10; its bar shows how many values fall in that range.

## What is a **bin** in a histogram?

A **bin** is one range of values in a histogram, such as orders from $5 to $10. Each value is counted in the bin it
falls in, and the bin's bar is as tall as that count. `ax.hist()` makes 10 bins unless `bins=` asks for another number
or lists the edges.

```python
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.hist([4.25, 6.50, 12.00, 14.75], bins=[0, 5, 10, 15])
# three bins, $0-5, $5-10 and $10-15: bars of 1, 1 and 2 orders
```

## In a sentence

- “An order of $6.50 lands in the $5 to $10 **bin**.”
- “Each **bin** in the histogram was $5 wide.”

Level: Apprentice · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=2)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/bin-python
