---
title: How is margin calculated?
description: How margin is calculated on Happy Buyers
---

[Skip to content](https://knowledge.happycabbage.me/how-is-margin-calculated#main-content)

English

Show submenu for translations

[![HappyCabbageLogo2024-3](https://knowledge.happycabbage.me/hs-fs/hubfs/HappyCabbageLogo2024-3.png?width=200&height=80&name=HappyCabbageLogo2024-3.png)](https://happycabbage.io/)

- [The Cabbage Patch Blog](https://7613181.hs-sites.com/en/blog)

Open main navigation

Close main navigation

- [The Cabbage Patch Blog](https://7613181.hs-sites.com/en/blog)
- English
  
  Show submenu for translations
- [Login to Happy Buyers](https://restock.happycabbage.ai/)

[Login to Happy Buyers](https://restock.happycabbage.ai/)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://knowledge.happycabbage.me/?hsLang=en)
2. [FAQs](https://knowledge.happycabbage.me/faqs?hsLang=en)

November 10, 2025

# How is margin calculated?

## Margin is calculated per product on Happy Buyers and then the product data is rolled up per brand, category and store on inventory health.

1. **We pull the POS sales data, for the day, every night**  
     1. We drop discounts and sales tax to get the price paid per item in each transaction
2. **We pull the unit cost from the package data** 
     1. We do some "smoothing" here to account for returns and credits by using a running 90 day unit cost average
3. **We take the total $ sold for the product, subtract the unit costs, and divide by the $ sold to get the margin %**
4. **We then roll this data up for every brand, and every THC infused category** 
     1. For the store level data, we total up ONLY the THC infused categories (the categories shown on the Inventory Health "Categories" tab

- [Getting started](https://knowledge.happycabbage.me/getting-started?hsLang=en)
- [Key workflows](https://knowledge.happycabbage.me/key-workflows?hsLang=en#main-content)

    - [Quicklinks](https://knowledge.happycabbage.me/key-workflows?hsLang=en#quicklinks)
- [Ordering](https://knowledge.happycabbage.me/ordering?hsLang=en#main-content)

    - [Overview](https://knowledge.happycabbage.me/ordering?hsLang=en#overview)
    - [Building orders](https://knowledge.happycabbage.me/ordering?hsLang=en#building-orders)
    - [Product lines](https://knowledge.happycabbage.me/ordering?hsLang=en#product-lines)
    - [Individual SKUs](https://knowledge.happycabbage.me/ordering?hsLang=en#individual-skus)
    - [Order management](https://knowledge.happycabbage.me/ordering?hsLang=en#order-management)
- [Product lines](https://knowledge.happycabbage.me/product-lines?hsLang=en#main-content)

    - [Overview](https://knowledge.happycabbage.me/product-lines?hsLang=en#overview)
    - [Creation and editing](https://knowledge.happycabbage.me/product-lines?hsLang=en#creation-and-editing)
    - [Order settings](https://knowledge.happycabbage.me/product-lines?hsLang=en#order-settings)
    - [Ordering](https://knowledge.happycabbage.me/product-lines?hsLang=en#ordering)
- [Reports](https://knowledge.happycabbage.me/reports?hsLang=en#main-content)

    - [Automated reports](https://knowledge.happycabbage.me/reports?hsLang=en#automated-reports)
    - [Inventory health](https://knowledge.happycabbage.me/reports?hsLang=en#inventory-health)
    - [KPI reports](https://knowledge.happycabbage.me/reports?hsLang=en#kpi-reports)
- [Org settings](https://knowledge.happycabbage.me/org-settings?hsLang=en)
- [FAQs](https://knowledge.happycabbage.me/faqs?hsLang=en)
- [POS integrations](https://knowledge.happycabbage.me/pos-integrations?hsLang=en)
- [Customer referral program](https://knowledge.happycabbage.me/customer-referral-program?hsLang=en)
- [Data security and compliance](https://knowledge.happycabbage.me/data-security-and-compliance?hsLang=en)

- [The Cabbage Patch Blog](https://7613181.hs-sites.com/en/blog)

[![Chill listening crop-3](https://knowledge.happycabbage.me/hs-fs/hubfs/HCA_Logo_horizontal-4.png?width=146&height=24&name=HCA_Logo_horizontal-4.png "Chill listening crop-3")](http://happycabbage.io)

happycabbage.io Help Center

Copyright © 2025, Happy Cabbage Analytics