★  GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|★  GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|★  GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|★  GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|
Two designers review a laptop beside an illustration of a website layout and calculator keypad.
AI How-ToNovember 21, 20264 min read

Build a Web Design Quote Calculator With Claude Code

Build a single-file web design quote calculator from a fictional rate card, then check the included-page threshold, invalid inputs, and layout at phone width.

GenAI Editorial

A web design quote calculator lets a client see which parts of a project change its price. We built one with Claude Code using a fictional studio rate card. A five-page site with copy editing came to MYR 2,800. The tool matched our hand calculations in 5 of 5 pricing cases. Changing the rate card exposed a problem the arithmetic checks missed.

What goes into a five-page estimate?

The studio charges MYR 1,800 for a site of up to three pages. Each extra page costs MYR 275. Copy editing adds a flat MYR 450 for the whole project. A five-page site uses two extra pages. That gives the client three line items they can check.

- Base package — MYR 1,800 covers the first three pages.

- Additional pages — 2 × MYR 275 adds MYR 550.

- Copy editing — MYR 450 applies once. The three line items total MYR 2,800.

Enter total pages in the calculator. Asking a client to enter “extra pages” would make them work out the package allowance themselves. Before writing the prompt, mark each item on your own rate card as included, per unit, or once per project. For a public example of how an estimator separates base, page and feature charges, see the Quotewise web design template.

What should you give Claude Code?

Give it the rate card, the input limits and what a client should see when an estimate is unavailable. We tested the following prompt in Claude Code on November 21, 2026. If you already have Claude Code installed, open a terminal in a new project folder, run claude, and paste the prompt. Anthropic’s Claude Code overview

Copyable prompt

Build a self-contained HTML web design quote calculator for a fictional studio, using ordinary browser JavaScript, local styles and no network requests. Output only the HTML. The base package is MYR 1,800 and includes up to three pages. Each additional page costs MYR 275. Copy editing for the entire project is an optional flat MYR 450. Input total page count, from 1 through 20 inclusive, whole numbers only. Start at 3 pages. Show the base, number and subtotal for additional pages, copy-editing fee, and total in MYR. Update on input. For blank, fractional, negative, zero or out-of-range counts, hide the price and show what to fix. Label the result as an estimate and note that custom integrations need separate scoping. Keep the rates in one editable configuration. Use a visible label and keyboard-friendly controls, and make the breakdown legible on a narrow phone screen. Do not collect contact information or send anything.

Copy the HTML from the response, leaving out the surrounding code fences. Save it as calculator.html in a plain-text editor, then open the file in your browser. Our generated file opened at three pages with copy editing off. It needed no server, and we observed no network requests during the browser test. For more examples of small development tasks to give the same tool, see eight Claude Code workflows developers run daily.

How can you tell if the calculator overcharges?

Work out the last included page and the first chargeable page on paper. With these rates, three pages cost MYR 1,800 and four cost MYR 2,075. If three pages already cost extra, inspect the calculation before sharing the file. The number of extra pages should be max(0, total pages − included pages).

We opened the unedited file in Chrome and used Playwright to change the inputs. Use these cases as a checklist, substituting expected amounts from your own rate card.

1. One page, copy editing off. Expected MYR 1,800. Chrome showed MYR 1,800.

2. Three pages, off. Expected MYR 1,800. The total held at MYR 1,800 on the last included page.

3. Four pages, off. Expected MYR 2,075. The first extra page brought the total to MYR 2,075.

4. Five pages, on. Expected MYR 2,800. Chrome showed MYR 2,800 with the flat fee applied once.

5. Twenty pages, on. Expected MYR 6,925. The largest allowed project showed MYR 6,925.

What happens if a client clears the page count?

The previous price should disappear. Otherwise a buyer can copy a plausible total that belongs to an earlier version of the project. In our test, a blank field showed “Enter the number of pages you need.” Entering 1.5, 0, −1, or 21 also hid the estimate and displayed a correction. HTML number fields support minimum, maximum and step constraints. An empty number field can still be valid unless it is required. Check the visible result as well as the field settings. MDN number input reference

We also focused the copy-editing checkbox at five pages and pressed Space. The total changed to MYR 2,800. At a simulated viewport width of 360 pixels, the full page fit without sideways scrolling. That test covered one Chrome layout. Open your version on a client's usual phone before handing it over.

What breaks when you change your package?

In a separate copy, we changed just the included-page allowance from three to four. The four-page estimate correctly dropped to MYR 1,800. The label beside it still said “Base package (up to 3 pages)”, and the help text repeated the old allowance. A client reading that screen would have good reason to question a correct total.

When you change your rates, read the page as a buyer. Check the package label, input hint, itemized breakdown and total together. Ask Claude Code to populate both the labels and the arithmetic from the same configuration, then change the allowance again to see if they move together.

How should I price a booking integration if the client only needs five pages?

Give the standard page estimate and flag the integration for a separate quote. Ask which booking system the client uses and what the connection needs to do before committing to a price. Adding a page and connecting a booking system are different pieces of work.

Sources

  1. Claude Code overview
  2. Number input | MDN

More where this came from

Keep reading.

See all posts →