Build a calculator builder: user-defined inputs, a safe formula evaluator, and a result page with an optional lead gate. Inputs: number with a min, max, step and unit; slider; select with a numeric value per option; toggle; and a text field for display only. Each input has a variable name used in formulas, a label, help text and a default. The formula evaluator, which is the part to get right. Implement a small expression parser and evaluator — not a language runtime, and never any form of eval on user input. Support: - arithmetic operators, parentheses, and comparison operators - a conditional expression (if condition then value else value) - a fixed set of functions: min, max, round, floor, ceil, abs, sqrt, pow - references to input variables and to previously computed intermediate variables Parse once at save time, report errors with a position in the expression, and reject anything referencing an undefined variable. Evaluate with a step limit and no access to anything outside the declared variables. Write tests for division by zero, missing inputs, and a circular reference between intermediates. Intermediates: a calculator can define named intermediate values computed from inputs, and the result page can show any of them. This is what makes a real calculator legible — showing only the final number leaves the visitor unable to see how it was reached. Result page: the headline number formatted with a unit and decimals, the intermediates as a breakdown, and outcome text chosen from author-defined ranges over the result. Optionally a simple bar or gauge. Lead gate: off by default. When enabled, the visitor sees the headline number and the breakdown is revealed after submitting an email address. Store the email with the full input set and result, plus a consent timestamp and the wording they consented to. Never gate the whole result behind the form — a calculator that shows nothing until you pay with an email is the pattern that makes people distrust the whole category, and the interface should say so when the option is enabled. Delivery: a standalone page at a stable slug, plus an embed script rendering into a shadow root, sized to content, under 25 KB. Data: every completed calculation stored with its inputs and result, exportable as CSV. That dataset — what people actually entered — is more valuable than the leads, and most calculator products bury it. Accessibility: real labelled form controls, keyboard operable, result announced to assistive technology on change. Out of scope: a template library, CRM or marketing-automation integrations, A/B testing, and any hosted multi-tenant deployment.