1. Add the script
Copy this into a page served by your web server, replacingyourKey with your key. This example uses the salary calculator:
2. Verify it renders
Widgets can’t run from afile:// page; they must load over http(s)://.
To view your test page:
- Save the HTML above as
index.html. - Open a terminal,
cdinto the folder that containsindex.html, and start a local web server with one of these:- Python:
python3 -m http.server 8000 - Node:
npx serve
- Python:
- Open the URL it prints (for example,
http://localhost:8000) in your browser.
If the key is missing or invalid, the widget shows an error instead of rendering the calculator (for example, “Invalid api key”). Double-check your key. See Prerequisites.
3. Swap in a different calculator
Change the script filename to any calculator type. For examplehourly.js, grossup.js, or flatbonus.js:
Next steps
Available calculators
Every calculator you can embed as a widget.
How calculators work
The model behind every calculation, and what drives the results.

