Math Notes

5 min read Original article ↗

Basics

Type a calculation on any line and its result appears right beside it as a dimmed hint. Errors show inline in red. The total at the bottom sums all numeric results, and results are formatted with thousands separators.

returns 2

returns 7

returns 4

returns 4

returns 1

returns 1,000,000

OperatorFunction
+Add
-Subtract
*Multiply
/Divide
^Power
%Remainder

Many more functions and operators are available — see the mathjs documentation.

Tabs

Use the tabs at the top to keep separate worksheets. Every tab is saved automatically as you type.

  • Switch — click a tab (or use / once focused, or Ctrl+Tab).
  • Reorder — click and drag a tab to a new position.
  • Rename — double-click the tab name.
  • Close — click the × (you'll be asked to confirm).
  • Add — click the + tab.
  • Export / Import — use the buttons in the Settings modal to download the active sheet as text or load one from a file.
  • Share — the Share button copies a link that carries the active sheet inside it. Anyone who opens it is asked whether to open the sheet in a new tab; it never replaces what they already have. Nothing is uploaded: the sheet travels in the link's # fragment, which browsers never send to a server.

Variables

Assign a value with = and reuse it on later lines. Use prev for the previous line's result, and sum/total/average/avg to aggregate the lines above until a blank line.

last line returns 15

last line returns 80

last line returns 30

last line returns 6

Functions

Store a function with f(x) = … and call it later. Numi-style aliases are available too: ln, fact, arcsin, arccos, arctan, root.

stores a function

returns 42

returns 120

returns 1

returns 2

Lists

Write a list with square brackets. Lists are 1-indexed: n[1] is the first element. Slice with a range, assign elements, do element-wise arithmetic, and combine lists with the mathjs functions.

[1, 2, 3]

10 (first element)

[20, 30, 40]

sets the second element

[4, 6]

returns 10

returns 5.5

[1, 2, 3]

[1, 2, 3, 4]

3

Sequences & iteration

A range start:end (with an optional :step) makes a list of numbers, and calling a function with a range applies it to every element. Lists can be named and indexed like any other variable.

[1, 2, 3, 4, 5]

[1, 3, 5, 7, 9]

3

[2, 4, 6, 8, 10]

returns 5050

returns 3

Percentages

Use of, on and off with % for percentage math.

returns 2

returns 31.5

returns 37.6

returns 50

returns 120

Operators & scales

Word operators and number scales work naturally.

returns 72

returns 5

returns 7

returns 42

returns 2,000

returns 2,000,000

Unit conversion

Convert units with to or in. CSS units are supported too: px, em and point.

returns 0.01 m

returns 7200 s

returns 5000 m

returns 86 degF

returns ≈ 37.8 px

returns 32 px

Base Unit
Length meter (m), inch (in), foot (ft), yard (yd), mile (mi), link (li), rod (rd), chain (ch), angstrom, mil
Surface
area
m2, sqin, sqft, sqyd, sqmi, sqrd, sqch, sqmil, acre, hectare
Volume m3, litre (l, L, lt, liter), cc, cuin, cuft, cuyd, teaspoon, tablespoon
Liquid
volume
minim (min), fluiddram (fldr), fluidounce (floz), gill (gi), cup (cp), pint (pt), quart (qt), gallon (gal), beerbarrel (bbl), oilbarrel (obl), hogshead, drop (gtt)
Angles rad (radian), deg (degree), grad (gradian), cycle, arcsec (arcsecond), arcmin (arcminute)
Time second (s, secs, seconds), minute (mins, minutes), hour (h, hr, hrs, hours), day (days), week (weeks), month (months), year (years), decade (decades), century (centuries), millennium (millennia)
Frequency hertz (Hz)
Mass gram(g), tonne, ton, grain (gr), dram (dr), ounce (oz), poundmass (lbm, lb, lbs), hundredweight (cwt), stick, stone
Electric
current
ampere (A)
Temperature kelvin (K), celsius (degC), fahrenheit (degF), rankine (degR)
Amount
of
substance
mole (mol)
Luminous
intensity
candela (cd)
Force newton (N), dyne (dyn), poundforce (lbf), kip
Energy joule (J), erg, Wh, BTU, electronvolt (eV)
Power watt (W), hp
Pressure Pa, psi, atm, torr, bar, mmHg, mmH2O, cmH2O
Electricity
and
magnetism
ampere (A), coulomb (C), watt (W), volt (V), ohm, farad (F), weber (Wb), tesla (T), henry (H), siemens (S), electronvolt (eV)
Binary bits (b), bytes (B)

See the mathjs units reference for the full list.

Currency conversion

Convert between currencies using 3-letter ISO codes or symbols. Rates come from the European Central Bank (via frankfurter.dev) and are cached locally for offline use.

converts USD to EUR

converts to GBP

converts to EUR

converts to BRL

Supported codes: BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, USD, ZAR.

Dates

Convert unix timestamps with fromunix, get the current time with unix(), and use date units directly.

Jan 1, 1970…

Nov 3, 2015…

current timestamp

30.4375 days

Shortcuts & files

The active sheet can be exported and imported from the Settings modal or with the shortcuts below.

ShortcutAction
⌘ZUndo the last change in the tab
⇧⌘ZRedo
Ctrl+Tab
Ctrl+⇧Tab
Next / previous tab
⌘1…9
Ctrl+1…9
Jump to the nth tab
⌘FFind & replace in the active sheet
⇧⌘CCopy the current line's result
⇧⌘S
⇧⌘L
Copy a share link for the active sheet
⇧⌘EExport the active sheet
⇧⌘IImport a sheet
⇧⌘⌫Clear the active sheet

About

Math Notes is a browser-based inline calculator, inspired by Numi. Its source is open — see the GitHub repository.

Calculations run on mathjs, an extensible math library for JavaScript, and currency conversion rates come from the European Central Bank via Frankfurter.

Your sheets stay on your device: they are saved in your browser's storage and are never sent to a server.