Commerce Tools

marie9423498
Participant

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

Hi Community,
Would like to hear advice and insights if you were able to solve a similar problem before.
I'm having a blocker on how to be able to calculate % percentages in HubSpot report.

One specific use case is we would like to be able to calculate the % Gross Profit of all Deal Won this month. Using custom report builder and using Deal and Line items as data points we are able to calculate the Revenue (Sum of Total Contract Value) and Gross Profit (Sum of total contract value margin) as shown in the dummy report below.

marie9423498_0-1749789391919.png

My question is how to calculate the % Gross Profit. It is as simple as dividing both values x 100 i.e. (Total Margin / Revenue) x 100

But I'm unsure how to implement this to have it show in the report? Any thoughts? 
I could not create a Line Item calculation property either as I could not find a Line item in the Property object (if you know what I mean).

marie9423498_1-1749789560066.png

 

0 Upvotes
1 Accepted solution
CHawkins
Solution
Top Contributor

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

Hi @marie9423498  👋 — you're definitely on the right path, and this is a great use case.

You're correct that the formula for % Gross Profit is simple:

(Gross Profit / Revenue) * 100

However, the challenge comes from implementing that in HubSpot’s Custom Report Builder, especially when you're working with Deals + Line Items.


Why This Is Tricky in HubSpot

HubSpot doesn’t currently support dividing one aggregated metric by another (e.g. sum of margin ÷ sum of revenue) directly in the Custom Report Builder unless you have formula fields available.

Also, calculated properties can’t be created for Line Items, and calculated fields at the Deal level can't reference associated Line Items natively.


Your Options

1. Use Formulas in Custom Report Builder (if your account supports it)

If you see an “Add formula” button in the Custom Report Builder:

  • Add Sum of Margin and Sum of Total Contract Value to the report

  • Click Add formula and enter:

     
    ([Sum of Margin] / [Sum of Total Contract Value]) * 100
  • Name it Gross Profit %, format as percentage

That’ll do exactly what you’re looking for — a real-time calculation in the report.


2. External Calculation via API or Workflow

If formulas aren't available in your account, consider this workaround:

  • Create a custom property on the Deal object (e.g., Gross Profit %)

  • Use a third-party tool (Zapier, Make, or custom API script) to:

    • Fetch the total margin and revenue from associated Line Items

    • Calculate Gross Profit %

    • Push it back to the Deal property

Then you can report on the property normally.


3. Export & Calculate in Excel or Google Sheets

Classic fallback:

  • Export the data from your existing report

  • Use a pivot table to group by month

  • Create a column that does: =Margin / Revenue * 100


Summary

Option Description Best For
Formula in Custom Report Builder Build the % field right inside the report If using Enterprise tiers or Reporting Add-on
API or Integration Push pre-calculated % into a Deal property If you have developer resources
Excel/Sheets Calculate manually post-export For quick monthly snapshots

Hope that helps! Let me know your HubSpot tier if you're unsure whether formulas are available — happy to confirm what’ll work best for your setup. 🙌

Casey Hawkins
HubSpot Freelancer | Digital Marketing Consultant

Found my solution helpful? Mark it as accepted

Schedule Time With Me

View solution in original post

8 Replies 8
marie9423498
Participant

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

@Rajib_alimul , unfortunately we don't have operations hub. I did hear about it though and it is an option too, but kind of expensive.

0 Upvotes
Rajib_alimul
Participant | Gold Partner
Participant | Gold Partner

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

@marie9423498 , No worries. In that case, this is a little bit of a workaround but once setup, it will work.

 

Simple version:

  1. Connect a Google sheet from Apps marketplace. If you have not used it, the integration is free.
  2. Through a workflow, post RAW data in Google sheet
  3. In a separate sheet, create a Pivot or other chart you like
  4. Embed the Google sheet Report tab in the HubSpot dashboard.

Advanced version

After Step 3 of the Simple version

  1. Create a Google Data Studio/Looker report
  2. Embed Looker report in HubSpot dashboard.

If you even face a problem with this, I would be happy to help over a short call  🙂

 

Alimul Rajib

CRM Manager

Finc3 Marketing Services GmbH
address
Hamburg, Germany
linkedin
Book a meeting with me
0 Upvotes
Rajib_alimul
Participant | Gold Partner
Participant | Gold Partner

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

Hello @marie9423498 , did you try reaching out HubSpot support?

In my opinion, if it is allowed with your subscription, you can try using Custom DATASET. Did you give it a try already?

Alimul Rajib

CRM Manager

Finc3 Marketing Services GmbH
address
Hamburg, Germany
linkedin
Book a meeting with me
0 Upvotes
h-recker
Contributor

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

HubSpot makes it tricky to do calculated percentages like % Gross Profit when you're working with Line Items. So I totally hear you and it seems like you've been given a lot of options. 

If you go the spreadsheet route, you can get a lot out of leveraging Coefficient's, certified 2-way sync between HubSpot and Sheets or Excel on HubSpot's marketplace.

You can pull HubSpot deal and line item data into your spreadsheet, then calculate metrics like % GP there. It's much easier to do the math (like Margin ÷ Revenue × 100), group by month, etc.

Then, you can either 1) push the calculated data back to HubSpot to build your report there, or 2) just build your visualization in Sheets and embed it back into your HubSpot dashboard. I made a quick video on how this works.

CHawkins
Solution
Top Contributor

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

Hi @marie9423498  👋 — you're definitely on the right path, and this is a great use case.

You're correct that the formula for % Gross Profit is simple:

(Gross Profit / Revenue) * 100

However, the challenge comes from implementing that in HubSpot’s Custom Report Builder, especially when you're working with Deals + Line Items.


Why This Is Tricky in HubSpot

HubSpot doesn’t currently support dividing one aggregated metric by another (e.g. sum of margin ÷ sum of revenue) directly in the Custom Report Builder unless you have formula fields available.

Also, calculated properties can’t be created for Line Items, and calculated fields at the Deal level can't reference associated Line Items natively.


Your Options

1. Use Formulas in Custom Report Builder (if your account supports it)

If you see an “Add formula” button in the Custom Report Builder:

  • Add Sum of Margin and Sum of Total Contract Value to the report

  • Click Add formula and enter:

     
    ([Sum of Margin] / [Sum of Total Contract Value]) * 100
  • Name it Gross Profit %, format as percentage

That’ll do exactly what you’re looking for — a real-time calculation in the report.


2. External Calculation via API or Workflow

If formulas aren't available in your account, consider this workaround:

  • Create a custom property on the Deal object (e.g., Gross Profit %)

  • Use a third-party tool (Zapier, Make, or custom API script) to:

    • Fetch the total margin and revenue from associated Line Items

    • Calculate Gross Profit %

    • Push it back to the Deal property

Then you can report on the property normally.


3. Export & Calculate in Excel or Google Sheets

Classic fallback:

  • Export the data from your existing report

  • Use a pivot table to group by month

  • Create a column that does: =Margin / Revenue * 100


Summary

Option Description Best For
Formula in Custom Report Builder Build the % field right inside the report If using Enterprise tiers or Reporting Add-on
API or Integration Push pre-calculated % into a Deal property If you have developer resources
Excel/Sheets Calculate manually post-export For quick monthly snapshots

Hope that helps! Let me know your HubSpot tier if you're unsure whether formulas are available — happy to confirm what’ll work best for your setup. 🙌

Casey Hawkins
HubSpot Freelancer | Digital Marketing Consultant

Found my solution helpful? Mark it as accepted

Schedule Time With Me

marie9423498
Participant

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

Hi @Jaycee_Lewis ,
Thanks for getting back to me. 
It is actually a Line Item data point as shown when creating the report in the custom builder

marie9423498_0-1750033879120.png

 

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

Thanks for clarifying @marie9423498 🙌 Hey @Josh @franksteiner79 @CHawkins, do you have any reporting magic you can sprinkle here 🪄🎩

 

Thank you very much for taking a look! — Jaycee


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

% Calculations in HubSpot (e.g. % Gross Profit)

SOLVE

Hey, @marie9423498 👋 Thanks for the great question. I can't fully test this one in my portal to test a custom formula just yet, but I did have a few clarifying questions. 

  • What is the name of the property that holds your total revenue? (e.g., “Total Contract Value”, “Amount”, etc.)
  • What is the name of the property that holds your total profit/margin in dollars? (e.g., “Total contract value margin”, “Total Margin”, etc.)

Thanks! — Jaycee

 

 


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes