Which tool to choose
For a personal tool that runs in the browser, the most direct route is a conversational assistant that writes an HTML page with the calculation inside. It works offline, you open it with a double-click, you carry it on a USB stick.
If you want the tool to be reachable by anyone online, you generate the same file and publish it on a free host. If the calculation is very complex or has to handle a lot of data, then an AI tool for proper apps is the better fit. But for a calculator, a converter, a timer, a quote estimator, a single HTML file is more than enough.
How to do it
From a browser or an app, the path is the same.
Describe what it has to calculate. Which numbers the user enters, what operation it performs, what it shows as a result. The more precise you are, the fewer corrections you'll need.
Ask the AI for the complete page. Specify that you want everything in a single file, with the interactive part included.
The operational syntax:
Write me a calculator in a single HTML file with the interactive code included. It must calculate the cost of a delivery: the user enters the distance in kilometers, I apply a fixed 2 euros plus 0.50 euros per kilometer. Show the total in euros when they press a "Calculate" button. Simple, readable style, working on smartphones too. Code ready to copy.Save and test. Copy the code into a text file, save it with the
.htmlextension (for examplecalc.html), double-click: it opens in the browser, you enter a value, press the button, see the result.Refine in words. Want an extra field, a different color, a check that prevents entering letters instead of numbers? Ask the assistant, pasting in the file, and regenerate.
Make it accessible where you need it. To use it just yourself, keep the file on your computer or phone. To share it, upload it to a free host and get a link.
Here's what a real, working calculator looks like, the same one from the example. Save it as calc.html and open it:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Delivery calculation</title>
</head>
<body style="font-family: sans-serif; max-width: 400px; margin: 40px auto;">
<h1>Delivery cost calculation</h1>
<label>Distance in kilometers:<br>
<input type="number" id="km" min="0" step="0.1">
</label>
<br><br>
<button onclick="calculate()">Calculate</button>
<p id="result" style="font-size: 1.3em; font-weight: bold;"></p>
<script>
function calculate() {
var km = parseFloat(document.getElementById("km").value);
if (isNaN(km) || km < 0) {
document.getElementById("result").textContent = "Enter a valid number.";
return;
}
var total = 2 + (km * 0.50);
document.getElementById("result").textContent = "Total: " + total.toFixed(2) + " euros";
}
</script>
</body>
</html>
A concrete example
Davide makes home deliveries and every time calculates the price in his head, often getting it wrong. He asks the assistant for the calculator from the example: two fixed euros plus fifty cents per kilometer. He gets the file, saves it on his phone, opens it from the browser. Now, in front of a customer, he types in the kilometers, presses "Calculate," and reads the exact total. He wants to add a discount for deliveries over ten kilometers: he asks the AI, regenerates, saves. A custom tool, in ten minutes, without knowing how to code.
When it does NOT work (and how to fix it)
If I press the button and nothing happens
Usually the file was copied halfway, or the interactive part (the <script>) is missing. Fix: recopy all the code from the start (<!DOCTYPE html>) to the end (</html>), and save it with the .html extension, not .txt. If the problem persists, paste the file into the AI and write: "I press the button but it doesn't calculate, fix the code."
If the result is wrong
The calculation you described didn't match what you wanted. Fix: re-describe the formula with a concrete numerical example ("if the distance is 10 km, the total should be 7 euros") so the AI understands exactly what you mean and corrects it.
If it accepts letters or absurd values
The user enters text where a number belongs and the tool goes haywire. Fix: the code in the example already checks that the value is a valid number. If you need a different check (for example a maximum), ask the AI to add it by describing the rule.
If you need to save the results or manage a list
A single file doesn't remember past calculations. Fix: for a history or a list that persists over time, you need more than a static page. Ask an AI tool for apps, describing that you want to save the data, or keep the results in a separate spreadsheet.
A tip from someone who actually uses it
Build the tool around the gesture you repeat every day. The value of a small tool isn't its sophistication, it's removing a mental calculation or a formula you look up every time. Look at what you do repeatedly (converting measurements, calculating margins, adding up hours) and have the tool written for that. An ugly calculator you use ten times a day is worth more than an elegant app you open once and forget.
Frequently asked questions
Do I need to install anything to use it?
No. An HTML page opens with any browser, which you already have. No programs, no sign-ups. The file runs even without internet, once saved.
Does it work on the phone?
Yes, if you ask the AI for a page "working on smartphones too." You save or open the file on the phone and use it like a small app. You can even add it to your home screen to keep it handy.
Can I make tools more complex than a calculator?
Yes: converters, timers, quote generators, checklists. As long as the tool performs a calculation or a transformation and shows a result, an HTML file is enough. To handle users, payments, or large amounts of data, you need a tool for proper apps.
If I don't understand the code, is that a problem?
No, and that's the point. You don't have to understand the code, you have to be able to describe it and fix it in words. But one caution: before relying on a calculation for decisions that matter (prices, doses, deadlines), check it by hand on two or three cases whose result you already know. The AI can get a formula wrong, and a wrong tool used with confidence does damage. Check that it gives the right numbers, then trust it.