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.
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).
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:
([SumofMargin]/[SumofTotalContractValue])*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
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.
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:
([SumofMargin]/[SumofTotalContractValue])*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
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 !
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 !