Skip to content

Pricing Calculator

Let people work out what a plan costs. Drag, click, key through or type the team size (and, for usage pricing, the runs, tokens or credits a month), watch the prices roll, and see which plan fits, what the overage adds and what yearly saves.

On this page

Examples

Seats and usage

Controlled

The plans and prices here are made up for the demo. They are not Knowns UI prices.

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

plansrequired
CalcPlan[]
{ id, name, description?, seatPrice, yearlyDiscount?, seatCap?, tiers?, included?, overageRate?, features? }. seatPrice is per seat per month. yearlyDiscount is a fraction (0.2 is 20 percent) off the seat price when billed yearly. seatCap is the most seats the plan takes. tiers is volume pricing: from that many seats every seat costs the tier price. included and overageRate are for usage mode.
mode
"seats" | "usage"
Default"seats"
Seats mode prices per seat. Usage mode adds a metered amount: seats plus included usage and overage over it. It needs `metric`.
metric
{ label, unit, min, max, step?, scale?, per?, default? }
Usage mode. scale is linear (moves by step) or log (moves through round numbers: 1, 1.5, 2, 3, 4, 5, 6, 8 times a power of ten; use it for a wide range). per is the block the overage rate is for, e.g. 1000 for a price per 1,000 runs.
seats
{ min?, max?, default?, label?, singular?, plural? }
Default1 to 100
The seat slider's range and wording.
value / defaultValue / onChange
{ seats, usage, billing } / same / (result) => void
Controlled and uncontrolled state. onChange gets { seats, usage, billing, planId, total, fits } and runs on every change from a slider, a number box, the billing switch or the Use N seats button. total is what is billed for the period on the selected plan, or null when no plan takes the seats.
onChoose
(planId, result) => void
The selected plan's button. Over its seat cap it reads Talk to sales and still calls this, with fits false, so you can route it. A button on another card selects that card first.
title / description
ReactNode
Default"Estimate your plan"
The heading and one line under it. title={null} hides the heading.
Layout
container width
Seats mode: a header with the billing switch, the seat slider, plan columns split by hairlines with a tinted marker that glides to the selected plan, and a summary beside them from about 900px (under them when narrower). Below about 540px the plans become one radio row each and the selected plan's details move to the summary. Usage mode: two panes, controls and the breakdown on the left and one panel for the plan that fits on the right (a plan meter, the name, why it fits, the total, its terms and one button); it stacks under about 770px.
currency / locale
string
Default"USD" / "en-US"
Used by Intl for every amount and count.
Recommendation
cheapest that fits
The plan with the lowest monthly total among those whose cap takes the seats, the first listed on a tie. When none does, the badge fades, the breakdown asks to talk to sales and the notice offers the largest cap. Ticks under a slider name the plan that starts to fit at that point.
Yearly
fraction off seats
Only the seat price is discounted; overage stays at its rate. The saving is twelve months of the discount on the list seat price, shown live under the controls.
Keyboard
slider
Arrows move one step (or to the next round number on a log scale), PageUp and PageDown move further, Home and End go to the ends. The number box takes typed values (12,000, 1.5k, 2m); Enter or leaving the box applies, Arrow keys step.
Motion
price roll, badge glide
Prices count to the new value in 280 ms and only on a change. The Recommended badge glides to the new card and does not fly in on load. The thumb follows the pointer directly and the value is passed on at most once a frame. With reduced motion everything is instant.
a11y
slider
Each slider has role="slider" with min, max, now and a text such as "20 seats, Team plan". The notice and the saving are polite live regions. The breakdown is a description list.

When to use

When to use

  • A pricing page where the price depends on team size, or on seats plus a metered amount such as agent runs or tokens, and people want to see their own number.
  • Showing which plan fits, what happens past a seat cap and what paying yearly saves, live, before anyone talks to sales.

When not to use

  • Two to four fixed plans with a monthly and yearly switch and no sliders: use Pricing.
  • One offer on its own card: use Pricing Card.
  • A customer's own spend and quota against their plan: use Usage Meter.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Pricing Calculator to my app and wire it to my own data.
  • I need a pricing page where the price depends on team size, or on seats plus a metered amount such as agent runs or tokens, and people want to see their own number. Set that up with the Knowns UI Pricing Calculator.
  • Which Pricing Calculator props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "pricing-calculator" }) and search_docs({ query: "pricing calculator" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Pricing Calculator, or found something off? We read every message.