# Bounce rate calculation using API data

**URL:** <https://community.hubspot.com/t/bounce-rate-calculation-using-api-data/18526>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [February 4, 2020, 9:24am UTC](https://community.hubspot.com/t/bounce-rate-calculation-using-api-data/18526 "2020-02-04T09:24:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![banstola](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/banstola/32/95715_2.png) [@banstola](https://community.hubspot.com/u/banstola)\
**Post date:** [February 4, 2020, 9:24am UTC](https://community.hubspot.com/t/bounce-rate-calculation-using-api-data/18526/1 "2020-02-04T09:24:04Z")

</div>

Hi we have following data for a given breakdown

```auto
{
 "2019-12-18": [
 {
 "breakdown": "foobar",
 "contactsPerPageview": 0.0625,
 "exitsPerPageview": 0.1875,
 "rawViews": 16,
 "pageTime": 1265,
 "standardViews": 16,
 "opportunities": 1,
 "pageBounceRate": 0.5,
 "exits": 3,
 "submissionsPerPageview": 0.125,
 "pageviewsMinusExits": 13,
 "submissions": 2,
 "pageBounces": 1,
 "timePerPageview": 97.3076923076923,
 "entrances": 2,
 "contacts": 1
 }
 ]}

```

We use **pageBounces/standardViews** to calculate bounce rate but the bounce rate figure is not matching with HS analytics page. What is the correct formula to calculate the bounce rate with the above data? I have seen other answers regarding this but can not get the numbers to match between UI and calculated data?

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [February 6, 2020, 4:25pm UTC](https://community.hubspot.com/t/bounce-rate-calculation-using-api-data/18526/2 "2020-02-06T16:25:48Z")

</div>

Hey @banstola

Just linking to our previous conversation and marking this thread as resolved as it is a duplicate thread.

[https://community.hubspot.com/t5/APIs-Integrations/Sessions-vs-entrance/m-p/316546](https://community.hubspot.com/t5/APIs-Integrations/Sessions-vs-entrance/m-p/316546)
