Notepad Calculator

Type natural math expressions line by line and see each result update instantly, like working on paper. Reference earlier lines, add labels, and keep a running tally without a clunky button calculator. Everything stays in your browser.

When to use it

  1. Work through a multi-step calculation with visible intermediate results.
  2. Keep a labelled running total for expenses or quantities.
  3. Sketch quick math without losing the steps that got you there.

How to Use

  1. Type a math expression on any line (e.g. '100 + 200').
  2. The result appears instantly on the right side.
  3. Define variables by writing 'name = value' (e.g. 'rate = 0.2').
  4. Use variable names in later lines (e.g. 'rate * 500').
  5. Start a line with # to write a comment.
  6. Click 'Copy Results' to copy all computed values.

Features

  1. Natural language math — no need for a button calculator
  2. Variable support: define and reuse values across lines
  3. Comment lines with #
  4. Percentage operations: '20% of 500', '100 + 15%'
  5. Copy all results with one click
  6. 100% browser-based — no data sent anywhere

FAQs

How does the Notepad Calculator work?

Type one math expression per line. Each line is evaluated independently and the result appears to the right. You can reference variables defined on earlier lines.

What operations are supported?

Addition (+), subtraction (−), multiplication (×/*), division (÷//), exponentiation (^), and percentage (%). You can also write '20% of 500' or 'tax = 0.2 * price'.

How do variables work?

Define a variable by writing 'name = expression' (e.g. 'rate = 73'). Then use the variable name in subsequent lines. Assignments do not produce a result on the right side.

How do I add comments?

Start a line with # to make it a comment. Comments are ignored by the calculator.

Is my data saved?

No. All data exists only in your browser session. Refreshing the page clears everything.

Technical Details

Each line is evaluated by a custom recursive-descent expression parser written in TypeScript — no eval() is used, preventing code injection. The parser supports +, −, ×, /, ^, %, 'X% of Y', and 'A + B%' percentage shortcuts. Variable assignment (name = expression) stores values in a shared scope object that persists across lines within the same session. Comments (lines starting with #) are skipped. Results are displayed in a synchronized right panel aligned per-line using matching line-height values.

From the Blog

  • BMI Calculator — Free, Instant & Accurate
  • VAT Calculator — All Countries Free (UK, AU, IN, CA, NG)

Calculators & Converters

Calculators & Converters

  • Mileage Calculator
  • Land Area Converter (Marla, Kanal, Acre)
  • Tire Size Calculator
  • Depth of Field Calculator
  • Gear Ratio and RPM Calculator
  • Engine Displacement Calculator
  • Compression Ratio Calculator
  • Horsepower, Torque and kW Calculator