How to Create Formula Fields in the Custom Report Builder in HubSpot

How to Create Formula Fields in the Custom Report Builder in HubSpot

You’ve probably hit a wall with HubSpot reports before. You needed metrics like customer retention rate or average deal velocity, only to find out the built-in fields don’t cover them. So, what happens next? For most teams, it means exporting data into spreadsheets, doing the math manually, and losing real-time visibility.

HubSpot’s Custom Report Builder offers the flexibility to combine data from multiple sources. But even that powerful feature won’t give you calculated values, like percentages, ratios, or time differences, unless you create them yourself. That’s where formula fields come in.

The problem? Many users struggle with building formulas that actually work. Functions get misused. Fields return errors. And key metrics don’t show up the way they should.

This walkthrough shows you exactly how to use formula fields inside HubSpot’s custom reports. You’ll explore how to set them up, avoid the common pitfalls, and use them to surface insights that sales, marketing, and RevOps teams rely on daily.

 

Calculate Custom Metrics Using Formula Fields in the Report Builder

Formula fields in HubSpot’s custom report builder allow you to calculate new metrics using the data your CRM already holds. Instead of exporting datasets to Excel or BI tools, you create the logic right inside HubSpot.

These calculated fields live only within the reports you create. That means they don’t alter your original CRM records; they’re strictly for reporting and visualization. You can pull data from one or more objects (like Deals, Contacts, Companies, or Custom Objects), and apply logic or math across those fields.

You’ll find the option to add a formula when building a custom report in a Professional or Enterprise-tier HubSpot account. The formula builder accepts standard math operators (+, -, *, /), logical conditions like IF(), and functions like DATE_DIFF() and ROUND().

By using formula fields, you can create calculated insights, such as conversion rates, deal duration, or campaign performance, without juggling outside software or constantly refreshing CSVs.

 

How It Works Under the Hood

Behind the scenes, every time you load or refresh a custom report, HubSpot recalculates your formula based on the current data, without ever touching the underlying CRM records.

Here’s how the process works step-by-step:

  • Inputs: You’ll use numeric, date, or Boolean fields for your inputs, such as deal amount, close date, lead score, or checkbox properties.
  • Process: When a report runs, HubSpot pulls qualifying records based on your filters. Then it executes the formula logic for each record, computes the results, and aggregates them (e.g., sum, average) based on how you’ve set up your display.
  • Outputs: Your result becomes another field in the dataset, usable directly in visualizations, charts, or dashboards.
  • Optional Settings: You can rename the calculated field, change its output format (number, currency, percent), and arrange it in your report layout as needed.

Keep in mind that all calculations happen client-side. If you’re running a formula across thousands of records, you may notice lag as HubSpot processes the logic in your browser. Also, watch out for incompatible data types; if your formula mixes numbers with text or includes null fields without logic to handle them, results can break.

 

Main Uses Inside HubSpot

Once you understand how formula fields behave, you can start replacing spreadsheet work with flexible, real-time insights right inside HubSpot. Here are three examples that show you how.

Conversion Rate Calculation

If you’re tracking progress through your sales funnel, a conversion formula shows how effectively leads move from one stage to the next, without exporting and counting manually.

Example: You’ve got deals created and deals marked as Closed Won. Add a formula like:

(Count of Deals in Closed Won) / (Count of Deals Created)

Format it as a percentage. Set an appropriate time filter. Now, you’re visualizing your conversion rate by pipeline or owner, fresh every time the report runs.

Average Days to Close

Sales ops teams often want to know how long deals stay open. You can calculate deal velocity by subtracting the creation date from the close date.

Example: Use this formula: DATE_DIFF([Close date], [Create date], “days”)

Then display it as an average grouped by owner or team. The result highlights bottlenecks in your pipeline and helps teams compare performance by region or rep.

Engagement Ratio for Leads

Want to assess how well a campaign engages new leads? Match engagement metrics to contact creation numbers for clear results.

Example: If you’re tracking email opens and contact creation by campaign, use:

[Email Opens] / [Contacts Created]

You’ll now see average engagement per lead, and know which campaigns drive actual interaction, not just volume.

 

Common Setup Errors and Wrong Assumptions

When formula fields don’t work as expected, it’s usually due to one of these mistakes. Here’s what to watch out for, and how to fix it fast.

Point: Using incompatible data types
Explanation: You can’t apply math to text or improperly structured dates. Always make sure you’re using fields like numbers, Booleans, or dates. For date differences, use date-based functions like DATE_DIFF().

Point: Ignoring null or empty values
Explanation: If either value in a division or subtraction is missing, your formula might break or return blanks. Solve this with conditional logic: IF([Field2] = 0, 0, [Field1] / [Field2]).

Point: Aggregating the wrong way
Explanation: If you sum values before computing a ratio, you might get skewed results. Instead, perform calculations row by row, then aggregate.

Point: Copying formulas across reports
Explanation: Since formula fields only exist in the report where you created them, copying the logic into another report often fails unless you also reselect matching fields.

 

Step-by-Step Setup or Use Guide

Ready to build your own formula field? Here’s how to do it efficiently:

Point: Go to Reports > Reports > Create custom report
Explanation: Open HubSpot and start a new custom report from the Reports dashboard.

Point: Choose the data sources
Explanation: Select objects like Deals, Contacts, or Custom Objects based on what you want to analyze. Click “Next.”

Point: Add your standard fields
Explanation: Drag in all fields you plan to use in formulas, both inputs (like “Create date”) and any values you want to compare or total (like “Amount”).

Point: Add a formula field
Explanation: In the left panel, click “Add field” then “Add formula.” A formula window opens.

Point: Enter your formula expression
Explanation: Write the logic using HubSpot’s supported functions. For example: ([Amount] / [Deal Count]) * 100

Point: Name and format the field
Explanation: Give it a clear name like “Avg Deal %” and set it to the right format (number, percent, or currency).

Point: Validate and apply
Explanation: Let HubSpot check your logic for syntax errors. If it’s valid, apply it. Otherwise, edit field references or functions.

Point: Add the formula field to your visualization
Explanation: Drag it into a chart, data table, or metric box. Choose whether to display it as a total, average, or over time.

Point: Save and preview results
Explanation: Save your report, test it across different filters, and check for unexpected values. Tweak the formula if anything looks off.

 

Measuring Results in HubSpot

Once your formula is producing values, you need to ensure they’re accurate, consistent, and meaningful. Here’s how to validate performance over time.

Checklist for measuring results:

Point: Compare formula outputs to export samples
Explanation: Export a small dataset and replicate your formula in Excel or Google Sheets. If the numbers match, your logic works.

Point: Add the field to a performance dashboard
Explanation: Use dashboards to track your KPIs monthly or quarterly. This simplifies visibility for managers and teams.

Point: Monitor aggregation type
Explanation: Ensure the formula displays as a sum, average, or count, depending on your intent. Misaggregation will distort your insights.

Point: Track adoption across teams
Explanation: Standardize formulas across department reports. Share logic documentation so everyone compares apples to apples.

Point: Review periodically
Explanation: CRM fields evolve. Reassess your formulas quarterly to confirm the source data and logic still apply.

 

Short Example That Ties It Together

Let’s say you want to understand which reps close the highest-value deals. Start by building a report on Deals. Pull in “Amount” and “Deal Stage.” Then create a formula: [Amount] / COUNT([Deal ID])

Group by Deal Owner and filter to only Closed Won deals. Display the result as a bar chart showing each owner’s average deal size. That’s your real-time answer, no spreadsheet needed. Pin it to your dashboard and revisit it every month.

 

How INSIDEA Helps

Getting formula fields right isn’t just about knowing the syntax. It’s about designing a reporting structure that scales across your company, accurately, consistently, and without confusion. That’s where INSIDEA comes in.

If you need reliable HubSpot analytics, our team brings hands-on experience with:

  • HubSpot onboarding: Set up your portal with accurate reporting at its core
  • Ongoing account management: Keep your field structure, workflows, and data clean over time
  • Custom automation support: Ensure accurate inputs with smart automation that feeds formula fields
  • Cross-team reporting strategy: Build dashboards that leaders and ops teams trust
  • Training and audits: Empower your staff to use, manage, and troubleshoot HubSpot reports confidently

Want tailored help creating reporting that actually drives decisions? Let’s talk or check out INSIDEA’s HubSpot consulting services

Jigar Thakker is a HubSpot Certified Expert and CBO at INSIDEA. With over 7 years of expertise in digital marketing and automation, Jigar specializes in optimizing RevOps strategies, helping businesses unlock their full potential. A HubSpot Community Champion, he is proficient in all HubSpot solutions, including Sales, Marketing, Service, CMS, and Operations Hubs. Jigar is dedicated to transforming your RevOps into a revenue-generating powerhouse, leveraging HubSpot’s unique capabilities to boost sales and marketing conversions.

The Award-Winning Team Is Ready.

Are You?

“At INSIDEA, it’s all about putting people first. Our top priority? You. Whether you’re part of our incredible team, a valued customer, or a trusted partner, your satisfaction always comes before anything else. We’re not just focused on meeting expectations; we’re here to exceed them and that’s what we take pride in!”

Pratik Thakker

Founder & CEO

Company-of-the-year

Featured In

Ready to take your marketing to the next level?

Book a demo and discovery call to get a look at:


By clicking next, you agree to receive communications from INSIDEA in accordance with our Privacy Policy.