# Histogram Counts

**URL:** <https://community.plotly.com/t/histogram-counts/24285>\
**Category:** plotly.js\
**Created:** [June 7, 2019, 2:13pm UTC](https://community.plotly.com/t/histogram-counts/24285 "2019-06-07T14:13:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgess](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@dgess](https://community.plotly.com/u/dgess)\
**Post date:** [June 7, 2019, 2:13pm UTC](https://community.plotly.com/t/histogram-counts/24285/1 "2019-06-07T14:13:03Z")

</div>

I have a histogram and am wondering if there are any ways to get the frequency counts for each bin.  
I am seeking to compute the percent change between the age groups.  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/a/ab8c97c4499e9c626d74846753021840b383922e.png)  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/5/5d2e22148d131ee33a2fe0f700cff3bd20ae1c62.png)

Thank you.

---

<div class="post-metadata">

**Author:** ![sbowman](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@sbowman](https://community.plotly.com/u/sbowman)\
**Post date:** [July 24, 2019, 4:26pm UTC](https://community.plotly.com/t/histogram-counts/24285/2 "2019-07-24T16:26:22Z")

</div>

I’m trying to do the same thing. I need to take the frequency information from my Histogram and feed that into the next plot. How can I extract the frequency information?

---

<div class="post-metadata">

**Author:** ![mbkupfer](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mbkupfer/32/4334_2.png) [@mbkupfer](https://community.plotly.com/u/mbkupfer)\
**Post date:** [July 25, 2019, 5:30am UTC](https://community.plotly.com/t/histogram-counts/24285/3 "2019-07-25T05:30:59Z")

</div>

Not sure if there is a more conventional way to do this, but I was able to uncover the bin counts in the `plot.calcdata` prop.

I’m not quite sure what you want to do with the points, but I made a quick demo in this codepen that shows how you can extract them: [https://codepen.io/mbkupfer/pen/BXzQKv](https://codepen.io/mbkupfer/pen/BXzQKv)

---

<div class="post-metadata">

**Author:** ![orenbh](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/orenbh/32/22364_2.png) [@orenbh](https://community.plotly.com/u/orenbh)\
**Post date:** [April 26, 2023, 12:03am UTC](https://community.plotly.com/t/histogram-counts/24285/4 "2023-04-26T00:03:31Z")

</div>

Do you know how to show the count on the bars (using trace.text)?
