How to add a custom calculator to a Wix site
Short answer
For simple sums, a calculator app from the Wix App Market is the fastest route. For pricing with tiers, conditions or lead capture, build it with Velo: add input elements to the page, read their values in code, and update a text element with the result. Velo works in the Wix Editor and Wix Studio, not in Wix Harmony.
Three ways to add a calculator
| Option | Best for | Limits |
|---|---|---|
| Calculator app (e.g. Calculator Builder, Elfsight) | Simple formulas, quick setup, no code | Complex logic, styling and lead handling can be limited |
| Embedded HTML calculator | A calculator you already have elsewhere | Sits in an iframe; harder to style and connect to your CMS |
| Custom Velo code | Tiered pricing, conditions, saving leads, matching your design | Needs JavaScript; Wix Editor or Wix Studio only |
Before you build: write the formula down
Most calculator problems are pricing problems. Before touching the editor, write your pricing as rules, then check them against three to five quotes you've actually sent. For example, for a cleaning company:
- Base price: £60 for up to 2 bedrooms
- Each extra bedroom: £15
- Deep clean: price × 1.5
- Minimum charge: £60
(These numbers are only an example. Use your own.)
Build it with Velo, step by step
1. Turn on Dev Mode
In the Wix Editor, turn on Dev Mode from the top menu. In Wix Studio, open the code panel. This shows the code editor and lets you set element IDs.
2. Add the inputs and a result
Add these elements to your page and set their IDs in the properties panel:
- A text input or dropdown for bedrooms:
#bedrooms - A checkbox for deep clean:
#deepClean - A text element for the price:
#price
3. Add the code
Paste this into the page code, then adjust the numbers to your pricing:
const BASE = 60; // up to 2 bedrooms
const PER_EXTRA_ROOM = 15;
const DEEP_MULTIPLIER = 1.5;
const MINIMUM = 60;
function calculate() {
const rooms = Number($w('#bedrooms').value) || 0;
const extraRooms = Math.max(0, rooms - 2);
let total = BASE + extraRooms * PER_EXTRA_ROOM;
if ($w('#deepClean').checked) {
total = total * DEEP_MULTIPLIER;
}
total = Math.max(MINIMUM, Math.round(total));
$w('#price').text = `£${total}`;
return total;
}
$w.onReady(function () {
$w('#bedrooms').onChange(calculate);
$w('#deepClean').onChange(calculate);
calculate();
});
For a text input, you can use onInput instead of onChange so the price updates as the visitor types.
4. Test it on desktop and mobile
Preview the page and try the edge cases: zero, very large numbers, and every combination of options. Then check the mobile layout, where calculators most often break visually.
Making it a lead generator
A calculator that just shows a number is a nice feature. One that captures the visitor is a sales tool. Common upgrades:
- Save each quote to a CMS collection with the inputs, result and date.
- Ask for an email before showing the detailed breakdown, and send it as a branded summary.
- Store prices in the CMS so you can change them from your dashboard without editing code.
- Notify yourself by email or WhatsApp when someone requests a quote.
A note on Wix Harmony
Wix's newer Harmony editor doesn't support Velo site code (Wix Developers). On a Harmony site, use an app or an embedded calculator instead.
Want it built for you?
I build custom Wix calculators that match your pricing exactly, look native to your site and send every result to you as a lead.
Sources
More guides
- Wix Editor vs Wix Studio vs Wix Harmony: which should you use in 2026?
- Wix pricing 2026: what a Wix website really costs
- WordPress to Wix migration checklist: move without losing your SEO
- Wix website not showing on Google? Why, and how to fix it
- 6 common Wix Velo errors and how to fix them
- Wix Studio vs Squarespace: which should you choose?
- How to speed up a slow Wix website
- Wix vs WordPress for small businesses
- How to hire a Wix developer: 10 questions to ask first
- Wix vs Webflow: should you build on Wix Studio or Webflow?
- Wix vs Shopify: which is better for your online store?
- How much does a Wix online store cost in 2026?
- Wix domains: what they cost and how to connect one you already own
- Wix SEO: a 20-step checklist to get your site found
- Is Wix good for SEO in 2026?
- How to take orders on Wix without online payment
- How much does Wix SEO cost?
- Wix delivery ordering: slots, postcode zones and subscription boxes
- Is your Wix site accessible? The rules, and how to fix it
- Wix Bookings for small businesses: what it can and can't do
- Wix Multilingual: a site in two or more languages, SEO included
- Wix members areas and paid content: memberships, paywalls and courses
- Selling on Wix in the UK: payment fees, VAT, shipping and store limits
- Wix forms: fix missing notifications, automate follow-ups and connect your CRM
- A Wix restaurant website: online ordering, menus and table reservations
- Local SEO on Wix: getting found in Google Maps and "near me" searches
- Selling event tickets on Wix: fees, features and limits
- Cookie banners and GDPR on a Wix site: UK and EU rules for 2026
- Wix Studio vs Framer: which should you build on?
- Can you export a Wix site? What you can take with you if you leave
- My web designer owns my Wix site: how to get it transferred to you
- Can I change my Wix template after publishing?
- Is Wix Velo being discontinued?