Skip to content
andcode Tools

Percentage Calculator

🔒 Runs in your browser

Four formulas, one calculator

Pick the question that matches what you already know: a% of b multiplies (e.g. 21% of 1000 is 210); a is what % of b divides a by b; percentage change from a to b expresses the difference as a share of the starting value; and a increased or decreased by b% scales a by (1 ± b/100) — the same formula a discount or a markup uses. Each mode relabels the two number fields so it is always clear which value plays which role.

When a result is undefined

Two of the four modes have a mathematical blind spot: "a is what % of b" cannot answer when b is 0 (dividing by zero), and neither can "percentage change from a to b" when a is 0. Both cases are caught explicitly and shown as a clear error instead of a broken or misleading number. Every calculation runs instantly in your browser as you type — nothing is sent to a server.

Frequently asked questions

What are the four percentage calculations?

a% of b (e.g. 21% of 1000 = 210); what percent a is of b (a/b × 100); the percentage change from a to b ((b−a)/a × 100); and a increased or decreased by b% (a × (1 ± b/100)).

How do I calculate a percentage increase or decrease?

Increase: multiply the starting value by (1 + percent/100). Decrease: multiply it by (1 − percent/100) — e.g. 1000 increased by 21% is 1210, and 1210 decreased by 21% is 955.9.

Why does the calculator show an error for some inputs?

"a is what % of b" is undefined when b is 0, and "percentage change from a to b" is undefined when a is 0 — both would require dividing by zero.

Is this calculation sent to a server?

No — every calculation runs instantly in your browser as you type; nothing is transmitted or stored.

Related tools

Clear local data?

This permanently erases everything this site has saved in this browser:

  • Saved audio projects (Audio Mixer autosave)
  • Project boards, cards and attachments (Kanban)
  • Your favorite tools
  • Preferences, such as your language choice

This can't be undone, and it only affects this browser on this device.