An interactive ROI calculator with configurable inputs, a safe formula engine, animated count-up results, URL sharing, and optional HubSpot form integration. Full style control from the editor.
The default SaaS ROI preset with side-by-side layout, 60/40 panel ratio, blue accent, animated results in 2 columns, and a shareable results link. Clean white card on Inter font.
See how much you could save
Stacked layout on a dark background with Poppins font and purple accent. Four custom inputs with sliders and a number field, three output cards including a primary highlight, and results in 3 columns. No form, shareable link enabled.
Estimate the revenue impact of improving your conversion rate
ROI Calculator Pro is an interactive calculator module for HubSpot. It lets visitors adjust inputs — sliders, number fields, dropdowns, or toggles — and see real-time results calculated by a safe formula engine. Results animate with a count-up effect, and the calculator state can be shared via URL parameters. An optional HubSpot form integration captures leads after they see their results.
Everything is configured from the HubSpot editor: inputs, formulas, outputs, form settings, and the full visual design. No code required.
Each calculator input is defined in a repeater field with full control over its behavior and appearance.
Every input has a unique field ID (snake_case), used to reference it in output formulas. Optional tooltip text adds a hover "?" icon with an explanation.
Output values are computed from formulas using a safe recursive descent parser — no eval() or Function() constructor. The parser supports:
Constants are defined separately with a name and value. They are available in all formulas alongside input values. Output values are also stored in state, so later outputs can reference earlier outputs.
Each output renders as a card in a configurable grid (1, 2, or 3 columns). Cards display an optional FontAwesome icon, the computed value, and a label. One or more cards can be marked as "primary" — these receive a highlighted background (accent color by default) for visual emphasis.
Output formatting options include: number (integer with commas), currency (currency symbol prefix), percent (value + % suffix), and decimal (fixed decimal places). Each output also supports a custom prefix and suffix for additional context.
When "Include in shareable URL" is enabled on an input, its current value is written to the page URL as a query parameter. Visitors can copy the URL (via the Copy Results Link button) and share it — when someone opens the link, the calculator initializes with the shared values and shows the same results.
URL parameters are updated in real time as inputs change, using history.replaceState() to avoid page reloads. Only inputs with URL sharing enabled are included.
Enable the form integration to capture leads after they calculate their ROI. Three trigger modes control when the form appears:
The form section includes a heading, subheading, the embedded HubSpot form, and a thank-you message that replaces the form after submission. All text is configurable from the Content tab.
Every visual property is controlled from the Style tab in the HubSpot editor. The module uses CSS custom properties internally, all derived from field values.
Two layout modes are available:
On mobile (below the tablet breakpoint), both layouts stack vertically. When "Sticky Results on Mobile" is enabled, the results panel sticks to the top of the viewport as the user scrolls through inputs.