Embed our calculators
Drop any SA tax calculator into your blog, knowledge base, or accountant site with two lines of code. Free, no signup, no API keys. Computation stays in the visitor's browser — nothing is sent to us.
How it works
Add a placeholder element with data-ib-calc="calc-slug" and load embed.js once per page. The script finds every placeholder and renders the calculator in a sandboxed iframe that auto-resizes to fit content.
Copy this
<div data-ib-calc="paye"></div> <script src="https://invoicebook.co.za/embed.js" async></script>
Replace paye with the slug of any calculator. You can place multiple calculators on a single page — only one <script> tag is needed.
Available calculators
Live demo
Here's the VAT calculator running through the embed code above:
What's included
- Always current. Whenever SARS rates change we update the calculators — your embed picks up the new rates the next time a visitor loads your page.
- Self-contained. All maths runs in the visitor's browser. No API calls, no external dependencies on your end, no privacy concerns about visitor data leaving your site.
- Auto-sizing. The iframe resizes to its content as inputs change. No fixed-height awkwardness.
- Mobile-friendly. The embed adapts to whatever container width you give it.
- Sandboxed. The iframe runs with a strict sandbox attribute — it can't access cookies, localStorage, or anything else on your domain.
What we ask in return
The embed shows a small "Powered by invoicebook.co.za" link below the calculator. That's the only string attached. No analytics on your end, no scripts beyond the iframe loader, no email signup.
Styling
Wrap the placeholder div in your own container if you want to constrain the width:
<div style="max-width: 540px; margin: 2rem auto;">
<div data-ib-calc="paye"></div>
</div>
<script src="https://invoicebook.co.za/embed.js" async></script>
The iframe takes the full width of its parent and reports its height to the host page automatically.
Caveats
- Same-origin pages won't load. The embed depends on the iframe pointing to
https://invoicebook.co.za/.... It won't work in environments that block third-party iframes (some intranets and CSP-strict CMSes). - SAVEd drafts don't sync. If you embed the invoice creator (not yet supported via embed), drafts are local to the iframe and won't persist outside it.
- Not tax advice. Same disclaimer as the standalone calculators — figures are estimates based on the published SARS rates and don't replace professional advice for your readers.