Skip to main content

Embeddable Calculators

Many of Banzai's resources contain activities designed to help people make sense of their personal finances. Examples include budget calculators, savings and retirement calculators, and more. Banzai calculators go great embedded into any informative or instructive resource—a blog, an article, etc.

Embedding Banzai calculators onto your own website adds personalized context to any resource while still maintaining your style and branding throughout. Remember, you're not limited to a single activity on a page. You can embed multiple calculators or even Banzai Coaches.

Search the calculator list below. Once you've found a calculator you'd like to embed on your website, select it for step-by-step instructions on how to add it to any resource on your website.

Technical Setup

There are three ways to embed Banzai calculators on your website. Choose the one that fits your site's architecture. (The same methods work for Banzai Coaches.)

The JavaScript snippet ensures calculators adapt to mobile devices and desktops alike.

  1. Insert this snippet before the closing </body> tag of your page, replacing hometown with your subdomain:

    <script>!function(e,t){var s="script",a=e.getElementsByTagName(s)[0],n=e.createElement(s);n.async=!0,n.src="https://banzai.org/coach/styles.js?subdomain=hometown",a.parentNode.insertBefore(n,a)}(document);</script>
  2. Add a <div> with class="__banzai-coach" and id="{calculator-id}" where you want the calculator to appear:

    <div id="mortgage-calculator" class="__banzai-coach"></div>

You're not limited to one activity per page — add multiple <div> elements for multiple calculators or Coaches.

IFRAME (Simpler — Not Responsive)

Similar to embedding a YouTube video. Update the activity ID and your subdomain:

<iframe src="https://banzai.org/coach/{activity-id}?subdomain=hometown" width="700" height="654" frameborder="0"></iframe>

The iframe solution has fixed width and height. Recommended dimensions are listed on each individual calculator's page.

Single-Page Application (SPA) Integration

If your site uses a JavaScript framework with client-side routing (Astro, Next.js, Nuxt, Gatsby, React Router), calculators must be re-mounted after each page navigation. Follow the JavaScript Snippet setup above, then call mount() after navigation:

if (window.BanzaiCoach?.ready) {
window.BanzaiCoach.mount()
}

Before navigating away, call unmount():

window.BanzaiCoach.unmount()

Or dispatch custom events:

document.dispatchEvent(new CustomEvent('banzai:mount'))
document.dispatchEvent(new CustomEvent('banzai:unmount'))

Embeddable Calculator List

A-C

Asset Depreciation Calculator
Auto Loan Affordability Calculator
Auto Loan Payoff Calculator
Auto Refinance Calculator
Auto Refinance Calculator—Monthly Payment
Auto Refinance Calculator—Term
Bond Calculator
Budget Calculator
CD Calculator
Cost of Living Calculator
Credit Card Payoff Calculator

D-F

Debt Payoff Calculator
Early Mortgage Payoff Calculator
Emergency Fund Calculator
Federal Income Tax Withholdings Calculator
50/30/20 Calculator

G-L

HELOC Calculator
Inflation Calculator
Investment Calculator
Low Rate/Cash Back

M-P

Minimum Payment Calculator
Money Market Account Calculator—By Interest Rate
Mortgage Affordability Calculator
Mortgage Calculator
Mortgage Estimation Calculator
Mortgage Refinance Calculator
Mortgage Type Activity
Personal Loan Calculator

Q-U

Rent Affordability Calculator
Retirement Calculator
Rule of 72—By Interest Rate
Rule of 72—By Years
Savings Calculator
Share Certificate Calculator
Simple vs. Compound Interest
Stimulus Check Calculator
Stimulus Check Calculator
Student Loan Payoff Calculator

V-X

Vacation Affordability Calculator