# Reckon > Reckon is a free, open-source notepad calculator that runs in the browser. Each line of a note is a > calculation (units, currencies, percentages, dates, time zones, variables, totals) and its answer shows > beside it. Notes stay in the browser; there is no server or account. Reckon has no HTTP API. To open a note for someone, build a link: `https://parmsam.github.io/reckon/#/new?text=` plus the note percent-encoded (encodeURIComponent), or a compressed `#/share/` link (raw DEFLATE, then base64url without padding). Both open a read-only preview with "Save a copy". To compute answers in code, import `https://parmsam.github.io/reckon/engine.js` and call `evaluate(note)`. ## Getting started Open **[Reckon](https://parmsam.github.io/reckon/)** and start typing. Each line is a calculation; its answer appears on the right as you type. Click an answer to copy it. - Write naturally: `3 apples + 2 apples`, `rent: 1,200`, `20% of $50`. - Name values with `=` (`hourly rate = $85/h`) and use them below. - `sum` totals the lines above it, back to the last heading or blank line. - Double-click a blank line under some answers for a `subtotal`; `grand total` adds up the subtotals. - Double-click an answer to use it in a line below. The reference shows the answer, stays live, and follows its line as you add or remove lines. - Tag lines with `#food` anywhere on them, then `sum #food` (or `avg`, `count`…) totals every line with that tag. - Notes are saved in your browser as you type. Open the notes list with the ☰ button. - Press ⌘/Ctrl K for every command, or ? for the keyboard shortcuts. Reckon works offline after the first visit, and you can install it as an app with its own icon and window: - **iPhone and iPad (Safari):** tap **Share**, then **Add to Home Screen**. - **Android (Chrome):** open the menu (⋮), then **Install app** or **Add to Home screen**. - **Chrome or Edge on a computer:** click the install icon in the address bar, or **Install Reckon** in the ⌘/Ctrl K menu. - **Safari on a Mac:** choose **File → Add to Dock**. The tip at the bottom of the notes list shows the right steps for your device. Tips cycle each visit; turn them off in Settings. ## Seeing how a note works - **Why this answer?** Hover an answer to see how the line was read, with the values it used ("rent ($1,200.00) + utilities ($150.00)"), and which lines it uses or is used by. - **No answer?** A "?" appears where the answer would be (once you leave the line). Hover or tap it for the reason. - **What depends on what:** the line with the cursor marks the lines it uses (green) and the lines that use it (orange). - **Try other numbers:** on a line like `rent = $1,200`, tap **⇆** for a slider and watch every answer below change. With *Drag numbers to change them* on (Settings), hold ⌥/Alt and drag any number. Undo puts it back. While you adjust, each answer that moves shows by how much next to it (`+$120.00`, `−3 days`), and so does the total. - **See the whole range:** tick **Sweep** in the slider and set its range (From – To). Every answer that uses the variable gets a small chart of how it changes across that range, with a dot where the slider is. Hover an answer for its values at both ends. - **Try other options:** write a choice like `transport = car | [train] | fly` and use `transport == fly` in later lines, or give options values (`fare = car $120 | [train $80]`). Click the current option to pick the next one (Shift-click for the previous one, or ⌘/Ctrl ⇧ Space on its line). - **Totals:** the bar under the note shows the total of the section you're in; select lines for their sum and average. ## Notes, sharing and backups - **Many notes**: create, search, pin and trash them in the notes list. Trashed notes can be restored. - **Tutorial and examples**: new users start with a tutorial, a monthly budget and a trip plan. Bring them back any time with *Add the tutorial and example notes* (in Settings, or the ⌘/Ctrl K menu). - **Share link** (the ↗ button): copies a link with the whole note compressed into it, labelled with the note's name (`…/reckon/#/share/monthly-budget/…`). Whoever opens it sees a read-only copy and can save their own. They can still try other numbers and options: each `name = number` line has a **⇆** slider, each choice can be clicked, and every answer follows. Nothing they change is saved, and *Save a copy* keeps the note as you shared it. The address bar always shows just the app's address, so copying it shares Reckon, never your note. - **Backups**: *Export all notes* (in the notes list) saves a JSON file; *Import notes* restores it, or turns `.txt` and `.md` files into notes. Notes live only in your browser, so Reckon reminds you to back up weekly (monthly or never in Settings), and only when notes have changed since your last backup. The reminder's *Back up* button saves the file. - **Download and export** (the ↓ button): the note as text, or with its answers as aligned text, Markdown (calculations become tables) or a web page you can print. *Copy with answers* puts the aligned text on the clipboard. ## Privacy Notes never leave your browser. There are no accounts, no servers and no analytics. Share links keep the note after the `#`, a part of the URL browsers never send to a server. The only network requests fetch exchange rates (open.er-api.com, falling back to Frankfurter; CoinGecko only if a note mentions crypto). They never include your notes, and you can turn them off in Settings. ## Questions **Why does a line show no answer?** Reckon shows nothing rather than guess. Common causes: an unknown name (`total cost + 1` before `total cost` is defined), two bare numbers in a row (`3 cats and 2 dogs`), or mixing units that don't convert (`5 km + 3 kg`). **How do I type decimals in another locale?** Always with a dot: `1,234.5`. The number format setting only changes how answers look. **Is `in` inches or "convert to"?** It converts when a unit follows (`5 km in miles`). Right after a number with nothing after it, it's inches (`6 ft 2 in`). In ordinary text (`5 people in the room`) it's ignored. **Why did a word stop working after I defined a variable?** Variables win over units and keywords, so after `F = 5`, `72 F` means 72 × 5. Pick a different name. ## Templates Ready-made notes to open and adapt. Every answer is tested. ### Split the bill Tax and tip on a shared meal. Click the tip to change it, and every answer follows. ``` food = $186.40 → $186.40 tax rate = 8.875% → 8.875% tip = 15% | [18%] | 20% → 18% people = 4 → 4 tax = tax rate of food → $16.54 tip amount = tip of food → $33.55 total = food + tax + tip amount → $236.50 each = total / people → $59.12 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Split%20the%20bill%0A%2F%2F%20Tax%20and%20tip%20on%20a%20shared%20meal.%20Click%20the%20tip%20to%20change%20it%2C%20and%20every%20answer%20follows.%0Afood%20%3D%20%24186.40%0Atax%20rate%20%3D%208.875%25%0Atip%20%3D%2015%25%20%7C%20%5B18%25%5D%20%7C%2020%25%0Apeople%20%3D%204%0Atax%20%3D%20tax%20rate%20of%20food%0Atip%20amount%20%3D%20tip%20of%20food%0Atotal%20%3D%20food%20%2B%20tax%20%2B%20tip%20amount%0Aeach%20%3D%20total%20%2F%20people) ### Trip budget Mix currencies freely; the total is in dollars. ``` flights: $420 × 2 → $840.00 hotel: 4 nights × €135 → €540.00 food: €60 × 4 → €240.00 tours: ¥12,000 → ¥12,000 sum in USD → $1,786.67 per person: prev / 2 → $893.33 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Trip%20budget%0A%2F%2F%20Mix%20currencies%20freely%3B%20the%20total%20is%20in%20dollars.%0Aflights%3A%20%24420%20%C3%97%202%0Ahotel%3A%204%20nights%20%C3%97%20%E2%82%AC135%0Afood%3A%20%E2%82%AC60%20%C3%97%204%0Atours%3A%20%C2%A512%2C000%0Asum%20in%20USD%0Aper%20person%3A%20prev%20%2F%202) ### Freelance hourly rate Work back from the income you want to the rate you need to charge. ``` target income = $120,000 → $120,000.00 expenses = $14,000 → $14,000.00 weeks off = 6 → 6 billable hours a week = 25 → 25 billable hours = (52 - weeks off) × billable hours a week → 1,150 hourly rate = (target income + expenses) / billable hours → $116.52 day rate = hourly rate × 8 → $932.17 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Freelance%20hourly%20rate%0A%2F%2F%20Work%20back%20from%20the%20income%20you%20want%20to%20the%20rate%20you%20need%20to%20charge.%0Atarget%20income%20%3D%20%24120%2C000%0Aexpenses%20%3D%20%2414%2C000%0Aweeks%20off%20%3D%206%0Abillable%20hours%20a%20week%20%3D%2025%0Abillable%20hours%20%3D%20%2852%20-%20weeks%20off%29%20%C3%97%20billable%20hours%20a%20week%0Ahourly%20rate%20%3D%20%28target%20income%20%2B%20expenses%29%20%2F%20billable%20hours%0Aday%20rate%20%3D%20hourly%20rate%20%C3%97%208) ### Salary and hourly pay Compare a salary with an hourly wage, and see a raise. ``` salary = $85,000 → $85,000.00 hours a week = 40 → 40 hourly = salary / (52 × hours a week) → $40.87 monthly = salary / 12 → $7,083.33 raise = 4% → 4% salary + raise → $88,400.00 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Salary%20and%20hourly%20pay%0A%2F%2F%20Compare%20a%20salary%20with%20an%20hourly%20wage%2C%20and%20see%20a%20raise.%0Asalary%20%3D%20%2485%2C000%0Ahours%20a%20week%20%3D%2040%0Ahourly%20%3D%20salary%20%2F%20%2852%20%C3%97%20hours%20a%20week%29%0Amonthly%20%3D%20salary%20%2F%2012%0Araise%20%3D%204%25%0Asalary%20%2B%20raise) ### Startup runway How long the money lasts, and when it runs out. ``` cash in bank = $480,000 → $480,000.00 monthly revenue = $18,000 → $18,000.00 salaries = $42,000 → $42,000.00 rent = $6,500 → $6,500.00 software = $2,300 → $2,300.00 other costs = $4,000 → $4,000.00 monthly burn = salaries + rent + software + other costs - monthly revenue → $36,800.00 runway = floor(cash in bank / monthly burn) months → 13 months out of money: today + runway → Mon, Feb 15, 2027 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Startup%20runway%0A%2F%2F%20How%20long%20the%20money%20lasts%2C%20and%20when%20it%20runs%20out.%0Acash%20in%20bank%20%3D%20%24480%2C000%0Amonthly%20revenue%20%3D%20%2418%2C000%0Asalaries%20%3D%20%2442%2C000%0Arent%20%3D%20%246%2C500%0Asoftware%20%3D%20%242%2C300%0Aother%20costs%20%3D%20%244%2C000%0Amonthly%20burn%20%3D%20salaries%20%2B%20rent%20%2B%20software%20%2B%20other%20costs%20-%20monthly%20revenue%0Arunway%20%3D%20floor%28cash%20in%20bank%20%2F%20monthly%20burn%29%20months%0Aout%20of%20money%3A%20today%20%2B%20runway) ### LTV and CAC What a customer is worth against what it costs to win one. Aim for 3× or more. ``` price = $49 → $49.00 gross margin = 80% → 80% monthly churn = 3% → 3% lifetime = round(1 / monthly churn, 1) → 33.3 ltv = price × gross margin × lifetime → $1,305.36 marketing spend = $25,000 → $25,000.00 new customers = 120 → 120 cac = marketing spend / new customers → $208.33 ltv to cac: round(ltv / cac, 1) → 6.3 months to win back cac: round(cac / (price × gross margin), 1) → 5.3 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20LTV%20and%20CAC%0A%2F%2F%20What%20a%20customer%20is%20worth%20against%20what%20it%20costs%20to%20win%20one.%20Aim%20for%203%C3%97%20or%20more.%0Aprice%20%3D%20%2449%0Agross%20margin%20%3D%2080%25%0Amonthly%20churn%20%3D%203%25%0Alifetime%20%3D%20round%281%20%2F%20monthly%20churn%2C%201%29%0Altv%20%3D%20price%20%C3%97%20gross%20margin%20%C3%97%20lifetime%0Amarketing%20spend%20%3D%20%2425%2C000%0Anew%20customers%20%3D%20120%0Acac%20%3D%20marketing%20spend%20%2F%20new%20customers%0Altv%20to%20cac%3A%20round%28ltv%20%2F%20cac%2C%201%29%0Amonths%20to%20win%20back%20cac%3A%20round%28cac%20%2F%20%28price%20%C3%97%20gross%20margin%29%2C%201%29) ### Loan payment The monthly payment on a loan, and what it costs in interest. ``` loan = $350,000 → $350,000.00 annual rate = 6.5% → 6.5% years = 30 → 30 r = annual rate / 12 → 0.5416666667% n = years × 12 → 360 payment = loan × r / (1 - (1 + r)^-n) → $2,212.24 total paid = payment × n → $796,405.71 interest = total paid - loan → $446,405.71 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Loan%20payment%0A%2F%2F%20The%20monthly%20payment%20on%20a%20loan%2C%20and%20what%20it%20costs%20in%20interest.%0Aloan%20%3D%20%24350%2C000%0Aannual%20rate%20%3D%206.5%25%0Ayears%20%3D%2030%0Ar%20%3D%20annual%20rate%20%2F%2012%0An%20%3D%20years%20%C3%97%2012%0Apayment%20%3D%20loan%20%C3%97%20r%20%2F%20%281%20-%20%281%20%2B%20r%29%5E-n%29%0Atotal%20paid%20%3D%20payment%20%C3%97%20n%0Ainterest%20%3D%20total%20paid%20-%20loan) ### Savings goal How long to save for something, and how compound interest grows a balance. ``` goal = $15,000 → $15,000.00 saved = $3,200 → $3,200.00 monthly saving = $450 → $450.00 months needed = ceil((goal - saved) / monthly saving) months → 27 months reached: today + months needed → Sat, Apr 15, 2028 balance = $10,000 → $10,000.00 rate = 5% → 5% after 10 years: balance × (1 + rate)^10 → $16,288.95 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Savings%20goal%0A%2F%2F%20How%20long%20to%20save%20for%20something%2C%20and%20how%20compound%20interest%20grows%20a%20balance.%0Agoal%20%3D%20%2415%2C000%0Asaved%20%3D%20%243%2C200%0Amonthly%20saving%20%3D%20%24450%0Amonths%20needed%20%3D%20ceil%28%28goal%20-%20saved%29%20%2F%20monthly%20saving%29%20months%0Areached%3A%20today%20%2B%20months%20needed%0Abalance%20%3D%20%2410%2C000%0Arate%20%3D%205%25%0Aafter%2010%20years%3A%20balance%20%C3%97%20%281%20%2B%20rate%29%5E10) ### Unit price Which pack is the better deal? ``` small = $3.49 / 400 g in $/kg → $8.73/kg large = $8.99 / 1.2 kg in $/kg → $7.49/kg large < small → true saving: round((small - large) / small, 3) in % → 14.1% ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Unit%20price%0A%2F%2F%20Which%20pack%20is%20the%20better%20deal%3F%0Asmall%20%3D%20%243.49%20%2F%20400%20g%20in%20%24%2Fkg%0Alarge%20%3D%20%248.99%20%2F%201.2%20kg%20in%20%24%2Fkg%0Alarge%20%3C%20small%0Asaving%3A%20round%28%28small%20-%20large%29%20%2F%20small%2C%203%29%20in%20%25) ### Scale a recipe Change the servings and every amount follows. Convert to metric as you go. ``` servings = 4 → 4 want = 10 → 10 scale = want / servings → 2.5 flour: 2.5 cups × scale in g → 750 g butter: round(6 tbsp × scale in g) → 213 g milk: 1.25 cups × scale in ml → 739.3382 mL bake: 350 °F in °C → 176.6667 °C ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Scale%20a%20recipe%0A%2F%2F%20Change%20the%20servings%20and%20every%20amount%20follows.%20Convert%20to%20metric%20as%20you%20go.%0Aservings%20%3D%204%0Awant%20%3D%2010%0Ascale%20%3D%20want%20%2F%20servings%0Aflour%3A%202.5%20cups%20%C3%97%20scale%20in%20g%0Abutter%3A%20round%286%20tbsp%20%C3%97%20scale%20in%20g%29%0Amilk%3A%201.25%20cups%20%C3%97%20scale%20in%20ml%0Abake%3A%20350%20%C2%B0F%20in%20%C2%B0C) ### Paint a room Wall area, less doors and windows, in liters of paint. ``` width = 4.2 m → 4.2 m length = 3.6 m → 3.6 m height = 2.5 m → 2.5 m walls = 2 × (width + length) × height → 39 m² doors and windows = 4 m² → 4 m² area = walls - doors and windows → 35 m² coats = 2 → 2 coverage = 10 m² per liter → 10 m²/L paint = area × coats / coverage → 7 L ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Paint%20a%20room%0A%2F%2F%20Wall%20area%2C%20less%20doors%20and%20windows%2C%20in%20liters%20of%20paint.%0Awidth%20%3D%204.2%20m%0Alength%20%3D%203.6%20m%0Aheight%20%3D%202.5%20m%0Awalls%20%3D%202%20%C3%97%20%28width%20%2B%20length%29%20%C3%97%20height%0Adoors%20and%20windows%20%3D%204%20m%C2%B2%0Aarea%20%3D%20walls%20-%20doors%20and%20windows%0Acoats%20%3D%202%0Acoverage%20%3D%2010%20m%C2%B2%20per%20liter%0Apaint%20%3D%20area%20%C3%97%20coats%20%2F%20coverage) ### Download time How long a file takes at a given speed. Bits (Mbps) and bytes (MB/s) convert for you. ``` file = 48 GB → 48 GB speed = 200 Mbps → 200 Mbps file / speed in min → 32 min backup = 2 TB → 2 TB backup / (40 MB/s) in hours → 13.8889 h ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Download%20time%0A%2F%2F%20How%20long%20a%20file%20takes%20at%20a%20given%20speed.%20Bits%20%28Mbps%29%20and%20bytes%20%28MB%2Fs%29%20convert%20for%20you.%0Afile%20%3D%2048%20GB%0Aspeed%20%3D%20200%20Mbps%0Afile%20%2F%20speed%20in%20min%0Abackup%20%3D%202%20TB%0Abackup%20%2F%20%2840%20MB%2Fs%29%20in%20hours) ### Project timeline Work back from a deadline, or forward from a start date. ``` launch = Mar 30 → Mon, Mar 30 days until launch → 74 days weeks until launch → 10.5714 weeks kickoff = next monday → Mon, Jan 19 kickoff + 6 weeks → Mon, Mar 2 code freeze: launch - 2 weeks → Mon, Mar 16 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Project%20timeline%0A%2F%2F%20Work%20back%20from%20a%20deadline%2C%20or%20forward%20from%20a%20start%20date.%0Alaunch%20%3D%20Mar%2030%0Adays%20until%20launch%0Aweeks%20until%20launch%0Akickoff%20%3D%20next%20monday%0Akickoff%20%2B%206%20weeks%0Acode%20freeze%3A%20launch%20-%202%20weeks) ### Meeting across time zones One time, everywhere the team works. ``` meeting = 9am PST → 9:00 AM PST meeting in New York → 12:00 PM EST meeting in London → 5:00 PM GMT meeting in Berlin → 6:00 PM GMT+1 meeting in Bangalore → 10:30 PM GMT+5:30 meeting in Tokyo → Fri, 2:00 AM GMT+9 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%23%20Meeting%20across%20time%20zones%0A%2F%2F%20One%20time%2C%20everywhere%20the%20team%20works.%0Ameeting%20%3D%209am%20PST%0Ameeting%20in%20New%20York%0Ameeting%20in%20London%0Ameeting%20in%20Berlin%0Ameeting%20in%20Bangalore%0Ameeting%20in%20Tokyo) ## Syntax reference Every line below is tested. Answers use sample exchange rates, and dates assume it is Thursday, Jan 15, 2026, 12:00 in UTC. ### Basics Type a calculation on any line; its answer appears beside it. Decimals are exact. ``` 2 + 3 × 4 → 14 (2 + 3) × 4 → 20 2^10 → 1,024 10 mod 3 → 1 5! → 120 0.1 + 0.2 → 0.3 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=2%20%2B%203%20%C3%97%204%0A%282%20%2B%203%29%20%C3%97%204%0A2%5E10%0A10%20mod%203%0A5%21%0A0.1%20%2B%200.2) ### Numbers Thousands separators, shorthands, other bases and fractions all work. ``` 1,000,000 + 1_000 → 1,001,000 1.5k + 2M → 2,001,500 3bn / 1 million → 3,000 1.5e3 → 1,500 0xFF + 0b1010 → 265 1½ → 1.5 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=1%2C000%2C000%20%2B%201_000%0A1.5k%20%2B%202M%0A3bn%20%2F%201%20million%0A1.5e3%0A0xFF%20%2B%200b1010%0A1%C2%BD) ### Text and structure Words around numbers are ignored, so notes read naturally. Text before a colon is a label. Lines starting with # are headings, and // starts a comment. ``` 3 apples + 2 apples → 5 rent: 1,200 → 1,200 5 plus 3 times 2 → 11 10 divided by 4 → 2.5 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=3%20apples%20%2B%202%20apples%0Arent%3A%201%2C200%0A5%20plus%203%20times%202%0A10%20divided%20by%204) ### Variables Name a value with =. Names can have spaces. ``` monthly rent = 1,200 → 1,200 utilities = 150 → 150 (monthly rent + utilities) × 12 → 16,200 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=monthly%20rent%20%3D%201%2C200%0Autilities%20%3D%20150%0A%28monthly%20rent%20%2B%20utilities%29%20%C3%97%2012) ### Your own functions and units Define a function with name(x) = …, or a unit with 1 name = …. They apply to the lines below. ``` tip(bill, rate) = bill × rate tip($80, 18%) → $14.40 1 sprint = 2 weeks → 2 weeks 3 sprints in days → 42 days 1 dozen = 12 → 12 3 dozen → 36 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=tip%28bill%2C%20rate%29%20%3D%20bill%20%C3%97%20rate%0Atip%28%2480%2C%2018%25%29%0A1%20sprint%20%3D%202%20weeks%0A3%20sprints%20in%20days%0A1%20dozen%20%3D%2012%0A3%20dozen) ### Previous answers and totals prev is the last answer. sum, avg, median, stdev, count, min and max cover the lines since the last heading or blank line. line3 is the answer on line 3; in the app, double-click an answer to use it below, and the reference follows its line as you add or remove lines. subtotal adds up the lines since the last subtotal, and grand total adds up the subtotals; in the app, double-click a blank line under some answers to add a subtotal. Tag lines with #words, and total them with sum #tag (or avg, count…), across the whole note. ``` groceries: 80 → 80 gas: 45 → 45 dinner: 55 → 55 sum → 180 median → 55 avg → 60 prev × 2 → 120 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=groceries%3A%2080%0Agas%3A%2045%0Adinner%3A%2055%0Asum%0Amedian%0Aavg%0Aprev%20%C3%97%202) ``` rent: 1,200 → 1,200 power: 80 → 80 subtotal → 1,280 food: 300 → 300 subtotal → 300 grand total → 1,580 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=rent%3A%201%2C200%0Apower%3A%2080%0Asubtotal%0Afood%3A%20300%0Asubtotal%0Agrand%20total) ``` lunch $12 #food → $12.00 taxi $30 #travel → $30.00 dinner $45 #food → $45.00 sum #food → $57.00 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=lunch%20%2412%20%23food%0Ataxi%20%2430%20%23travel%0Adinner%20%2445%20%23food%0Asum%20%23food) ### Percentages ``` 20% of 50 → 10 50 + 10% → 55 10% off $80 → $72.00 5 as % of 20 → 25% 5 is what % of 20 → 25% 20% of what is 5 → 25 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=20%25%20of%2050%0A50%20%2B%2010%25%0A10%25%20off%20%2480%0A5%20as%20%25%20of%2020%0A5%20is%20what%20%25%20of%2020%0A20%25%20of%20what%20is%205) ### Comparisons and conditions Compare with < > <= >= == and !=, and combine with and, or and not. Units and currencies convert before comparing. ``` 5 km > 3 miles → true 0.1 + 0.2 == 0.3 → true order = $120 → $120.00 if order >= $100 then 10% off order else order → $108.00 0xF0 | 0x0F → 255 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=5%20km%20%3E%203%20miles%0A0.1%20%2B%200.2%20%3D%3D%200.3%0Aorder%20%3D%20%24120%0Aif%20order%20%3E%3D%20%24100%20then%2010%25%20off%20order%20else%20order%0A0xF0%20%7C%200x0F) ### Choices Options separated by |, with the current one in brackets. In the app, click it to pick the next one. Options can carry values. ``` transport = car | [train] | fly → train if transport == train then $80 else $300 → $80.00 fare = car $120 | [train $80] | fly $300 → $80.00 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=transport%20%3D%20car%20%7C%20%5Btrain%5D%20%7C%20fly%0Aif%20transport%20%3D%3D%20train%20then%20%2480%20else%20%24300%0Afare%20%3D%20car%20%24120%20%7C%20%5Btrain%20%2480%5D%20%7C%20fly%20%24300) ### Units Convert with in, to or as. Units combine and cancel, and plain numbers take the other side's unit. ``` 5 km in miles → 3.1069 mi 6 ft 2 in in cm → 187.96 cm 72 °F in °C → 22.2222 °C 2 cups in ml → 473.1765 mL 1 GB / 4 MB → 250 60 mph in km/h → 96.5606 km/h 3 m × 4 m → 12 m² 1 m + 20 cm → 1.2 m 12pt in px → 16 px 2 cups flour in g → 240 g ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=5%20km%20in%20miles%0A6%20ft%202%20in%20in%20cm%0A72%20%C2%B0F%20in%20%C2%B0C%0A2%20cups%20in%20ml%0A1%20GB%20%2F%204%20MB%0A60%20mph%20in%20km%2Fh%0A3%20m%20%C3%97%204%20m%0A1%20m%20%2B%2020%20cm%0A12pt%20in%20px%0A2%20cups%20flour%20in%20g) ### Money Currency symbols, codes and names, plus crypto. Rates refresh hourly and keep working offline; these examples use sample rates. ``` $30 in EUR → €27.00 €20 + $5 → €24.50 hourly rate = $85/h → $85.00/h 37.5 h × hourly rate → $3,187.50 0.01 BTC in USD → $1,000.00 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=%2430%20in%20EUR%0A%E2%82%AC20%20%2B%20%245%0Ahourly%20rate%20%3D%20%2485%2Fh%0A37.5%20h%20%C3%97%20hourly%20rate%0A0.01%20BTC%20in%20USD) ### Dates and times These examples assume it's Thursday, Jan 15, 2026, 12:00 in UTC. ``` today + 2 weeks → Thu, Jan 29 next friday at 3pm → Fri, Jan 16, 3:00 PM days until Dec 25 → 344 days Jan 31 + 1 month → Sat, Feb 28 3pm + 90 min → 4:30 PM 3 days ago → Mon, Jan 12 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=today%20%2B%202%20weeks%0Anext%20friday%20at%203pm%0Adays%20until%20Dec%2025%0AJan%2031%20%2B%201%20month%0A3pm%20%2B%2090%20min%0A3%20days%20ago) ### Time zones Use places (every major city), abbreviations like PST, or offsets like UTC+5:30. ``` time in Tokyo → 9:00 PM GMT+9 3pm PST in London → 11:00 PM GMT 9:00 EST to CET → 3:00 PM GMT+1 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=time%20in%20Tokyo%0A3pm%20PST%20in%20London%0A9%3A00%20EST%20to%20CET) ### Functions and formats ``` sqrt(16) + cbrt(27) → 7 round(3.14159, 2) → 3.14 sin(30) → 0.5 log(1000) → 3 2pi → 6.2831853072 255 in hex → 0xFF 1500 in sci → 1.5e3 ``` [Open in Reckon](https://parmsam.github.io/reckon/#/new?text=sqrt%2816%29%20%2B%20cbrt%2827%29%0Around%283.14159%2C%202%29%0Asin%2830%29%0Alog%281000%29%0A2pi%0A255%20in%20hex%0A1500%20in%20sci) ## Glossary Every word and symbol Reckon understands. ↵ separates lines of a multi-line example. ### Lines and structure Each line is one calculation. These shape a note. | Write | Meaning | Example | |---|---|---| | `# Heading` | A heading: starts a section and resets sum, avg and the other totals | | | `// comment` | A comment, at the start or end of a line | `5 + 5 // ten` → 10 | | `label:` | Text before a colon is a label and is ignored | `rent: 1,200` → 1,200 | | `name = value` | Defines a variable; names can have spaces | `tax rate = 8%` → 8% | | `(blank line)` | Ends a block, so the next sum starts again | | | `other words` | Descriptive words around numbers are ignored, unless they sit where a value belongs | `3 apples + 2 apples` → 5 | ### Numbers | Write | Meaning | Example | |---|---|---| | `1,000` `1_000` | Thousands separators (commas only outside parentheses) | `1,000,000 + 1_000` → 1,001,000 | | `1.5e3` `2.5E-3` | Scientific notation | `1.5e3` → 1,500 | | `k` `K` `M` `bn` | Suffixes written right after a number: thousand, million, billion | `1.5k + 2M` → 2,001,500 | | `thousand` `million` `billion` `trillion` | Scale words after a number | `2 million` → 2,000,000 | | `0x…` `0b…` `0o…` | Hexadecimal, binary and octal numbers | `0xFF + 0b1010` → 265 | | `½` `⅓` `⅔` `¼` `¾` `⅕` `⅖` `⅗` `⅘` `⅙` `⅚` `⅛` `⅜` `⅝` `⅞` | Fraction characters, alone or after a whole number | `1 ½ + ¼` → 1.75 | ### Operators Symbols and their word forms. Multiplication can also be implied: 2(3 + 4), 2pi. | Write | Meaning | Example | |---|---|---| | `+` | Add | `2 + 3` → 5 | | `-` `−` `–` | Subtract, or make negative | `10 − 4` → 6 | | `*` `×` `·` `⋅` | Multiply | `6 × 7` → 42 | | `/` `÷` | Divide | `10 ÷ 4` → 2.5 | | `^` `**` `²` `³` | Power | `2^10` → 1,024 | | `!` | Factorial | `5!` → 120 | | `( )` | Grouping | `(2 + 3) × 4` → 20 | | `=` `(at the end)` | A trailing = is ignored | `2 + 2 =` → 4 | | `plus` | Add | `5 plus 3` → 8 | | `minus` | Subtract | `5 minus 3` → 2 | | `times` `multiplied by` | Multiply | `5 times 3` → 15 | | `divided by` | Divide | `10 divided by 4` → 2.5 | | `mod` `modulo` | Remainder after division | `10 mod 3` → 1 | | `x` | Times, when it sits between two numbers | `3 x 4` → 12 | | `per` | Divides: km per hour | `100 km per 2 h` → 50 km/h | | `&` | Bitwise and (whole numbers) | `0xFF & 0x0F` → 15 | | `\|` | Bitwise or | `0xF0 \| 0x0F` → 255 | | `xor` | Bitwise exclusive or | `5 xor 3` → 6 | | `<<` `>>` | Shift bits left or right | `1 << 10` → 1,024 | ### Percentages | Write | Meaning | Example | |---|---|---| | `%` `percent` `pct` | A percentage | `20 percent` → 20% | | `of` | Percentage of an amount | `20% of 50` → 10 | | `+ %` `- %` | Add or subtract a percentage of the amount | `50 + 10%` → 55 | | `off` | Discount | `10% off $80` → $72.00 | | `on` | Markup | `10% on 50` → 55 | | `as % of` `as a % of` | What percentage one amount is of another | `5 as % of 20` → 25% | | `is what % of` | Same, as a question | `5 is what % of 20` → 25% | | `% of what is` | The whole, from a part and its percentage | `20% of what is 5` → 25 | ### Comparisons and conditions Comparisons answer true or false. Units, currencies and dates convert before comparing. | Write | Meaning | Example | |---|---|---| | `<` `>` `<=` `>=` `≤` `≥` | Less than, greater than, or equal | `5 km > 3 miles` → true | | `==` `!=` `≠` | Equal, not equal (decimals are exact) | `0.1 + 0.2 == 0.3` → true | | `and` `&&` | Both are true | `5 > 3 and 2 > 1` → true | | `or` `\|\|` | Either is true | `5 > 30 or 2 > 1` → true | | `not` | The opposite | `not 5 > 3` → false | | `true` `false` | True and false values | `member = true` → true | | `if … then … else …` | Picks a value by a condition; without else, false shows no answer | `price = $120 ↵ if price > $100 then 10% off price else price` → $108.00 | | `… \| [… ] \| …` | A choice: the bracketed option is current (or the first). In the app, click it to pick the next one | `transport = car \| [train] \| fly ↵ if transport == train then $80 else $300` → $80.00 | | `… $… \| [… $…]` | A choice whose options have values: the variable is the current one | `fare = car $120 \| [train $80] \| fly $300` → $80.00 | ### Your own functions and units Definitions apply to the lines below them. | Write | Meaning | Example | |---|---|---| | `name(x) = …` `name(x, y) = …` | Defines a function; it can use variables above it and call itself | `area(w, h) = w × h ↵ area(3 m, 4 m)` → 12 m² | | `1 name = …` | Defines a unit (the plural works too). It can replace a built-in one, like a metric cup | `1 sprint = 2 weeks ↵ 3 sprints in days` → 42 days | ### Totals and references | Write | Meaning | Example | |---|---|---| | `sum` `total` | Adds up the answers above, back to the last heading or blank line | `10 ↵ 20 ↵ sum` → 30 | | `avg` `average` `mean` | Average of the answers above | `10 ↵ 20 ↵ avg` → 15 | | `median` | Middle answer above (the mean of the two middle ones when the count is even) | `10 ↵ 20 ↵ median` → 15 | | `stdev` `stddev` `std` | Sample standard deviation of the answers above (n − 1, like spreadsheets) | `10 ↵ 20 ↵ stdev` → 7.0710678119 | | `count` | How many answers are above | `10 ↵ 20 ↵ count` → 2 | | `min` | Smallest answer above (min(…) with parentheses is the function) | `10 ↵ 20 ↵ min` → 10 | | `max` | Largest answer above (max(…) with parentheses is the function) | `10 ↵ 20 ↵ max` → 20 | | `subtotal` | Sum since the last subtotal, blank line or heading; in the app, double-click a blank line to add one | `10 ↵ 20 ↵ subtotal` → 30 | | `grand total` | Every subtotal since the last heading, plus the answers after the last one | `10 ↵ 20 ↵ grand total` → 30 | | `prev` `previous` `ans` | The previous answer | `10 ↵ prev × 2` → 20 | | `line3` `line 3` | The answer on line 3 (any line number) | `7 ↵ 8 ↵ line1 × 10` → 70 | | `#tag` | Tags a line (lunch $12 #food); a total followed by tags (sum #food) covers every line above with them | `lunch $12 #food ↵ taxi $30 ↵ dinner $45 #food ↵ sum #food` → $57.00 | ### Conversions and formats Convert with any of these words, followed by a unit, a currency, a time zone or a format. | Write | Meaning | Example | |---|---|---| | `in` `to` `as` `into` | Convert: 5 km in miles, $30 to EUR, now in Tokyo | `5 km in miles` → 3.1069 mi | | `hex` `hexadecimal` | Show in hexadecimal | `255 in hex` → 0xFF | | `bin` `binary` | Show in binary | `10 in binary` → 0b1010 | | `oct` `octal` | Show in octal | `8 as oct` → 0o10 | | `sci` `scientific` | Show in scientific notation | `1500 in sci` → 1.5e3 | | `dec` `decimal` | Show as a plain decimal again | `0xFF in dec` → 255 | | `%` `percent` `percentage` | Show as a percentage | `0.25 as %` → 25% | ### Functions Write function(argument), or leave out the parentheses for one argument: sqrt 16. | Write | Meaning | Example | |---|---|---| | `sqrt` | Square root (also of areas: sqrt(16 m²) = 4 m) | `sqrt(16)` → 4 | | `cbrt` | Cube root | `cbrt(27)` → 3 | | `root` | nth root: root(x, n) | `root(16, 4)` → 2 | | `abs` | Absolute value | `abs(-5)` → 5 | | `round` | Round, optionally to n decimal places: round(x, n) | `round(3.14159, 2)` → 3.14 | | `floor` | Round down | `floor(2.7)` → 2 | | `ceil` | Round up | `ceil(2.1)` → 3 | | `trunc` | Drop the decimals | `trunc(-2.7)` → -2 | | `sin` | Sine (degrees by default; also takes angles: sin(pi rad)) | `sin(30)` → 0.5 | | `cos` | Cosine | `cos(60)` → 0.5 | | `tan` | Tangent | `tan(45)` → 1 | | `asin` | Inverse sine | `asin(1)` → 90 | | `acos` | Inverse cosine | `acos(0)` → 90 | | `atan` | Inverse tangent | `atan(1)` → 45 | | `sinh` | Hyperbolic sine | `sinh(0)` → 0 | | `cosh` | Hyperbolic cosine | `cosh(0)` → 1 | | `tanh` | Hyperbolic tangent | `tanh(0)` → 0 | | `ln` | Natural logarithm | `ln(e)` → 1 | | `log` | Logarithm, base 10 or log(x, base) | `log(8, 2)` → 3 | | `log2` | Base-2 logarithm | `log2(1024)` → 10 | | `exp` | e to the power of x | `exp(1)` → 2.7182818285 | | `fact` `factorial` | Factorial (same as x!) | `fact(5)` → 120 | | `min` | Smallest of the arguments (units convert) | `min(3 m, 250 cm)` → 2.5 m | | `max` | Largest of the arguments | `max(4, 9, 2)` → 9 | | `sum` `total` | Sum of the arguments | `sum(1, 2, 3)` → 6 | | `avg` `average` `mean` | Average of the arguments | `avg(2, 4)` → 3 | | `median` | Middle value of the arguments | `median(5, 1, 3)` → 3 | | `stdev` `stddev` `std` | Sample standard deviation of the arguments | `stdev(2, 4, 4, 4, 5, 5, 7, 9)` → 2.1380899353 | ### Constants | Write | Meaning | Example | |---|---|---| | `pi` `π` | π, 3.14159… | `2 × pi` → 6.2831853072 | | `tau` `τ` | τ = 2π | `2 × tau` → 12.5663706144 | | `e` | Euler's number, 2.71828… | `2 × e` → 5.4365636569 | | `phi` `φ` | The golden ratio φ, 1.61803… | `2 × phi` → 3.2360679775 | ### Dates and times Dates and times can be combined ("tomorrow at 9am", "Dec 25 3pm") and followed by a time zone ("3pm PST"). | Write | Meaning | Example | |---|---|---| | `today` `tomorrow` `yesterday` | Relative days | `tomorrow` → | | `now` | The current date and time | `now + 3 h` → | | `monday` `tuesday` `wednesday` `thursday` `friday` `saturday` `sunday` | The next such day (today counts) | `friday` → | | `next …` `last …` `this …` | Before a weekday (abbreviations work here: mon, tue, wed, thu, fri, sat, sun, tues, thur, thurs), or next/last before week, month, year | `next monday` → | | `january` `jan` `february` `feb` `march` `mar` `april` `apr` `may` `june` `jun` `july` `jul` `august` `aug` `september` `sep` `october` `oct` `november` `nov` `december` `dec` `sept` | Months, with a day: Dec 25, December 25th, 2027, 25 Dec, 3rd of March | `Dec 25` → | | `2026-07-04` `2026-07-04T09:30` | ISO dates, with an optional time | `2026-07-04` → | | `3pm` `3:30 pm` `11 a.m.` `15:45` | 12- and 24-hour times | `3:30 pm` → | | `noon` `midday` `midnight` | Named times | `noon` → | | `at` | Joins a date and a time | `tomorrow at 9am` → | | `+ duration` `- duration` | Move a date or time; months follow the calendar | `today + 2 weeks` → | | `date - date` | Time between: days for dates, hours for times | `Dec 25 - today` → | | `ago` | Before now | `3 days ago` → | | `later` `in …` | After now | `in 45 min` → | | `from` | After a given date | `2 weeks from today` → | | `until` `till` `since` | Time to or from a date, after a unit ("days until") or "time" | `days until Dec 25` → | ### Time zones Convert with in or to ("3pm PST in London"), or write "time in Tokyo" for the current time there. | Write | Meaning | Example | |---|---|---| | `PST` `PDT` `PT` | America/Los Angeles | | | `MST` `MDT` `MT` | America/Denver | | | `CST` `CDT` `CT` | America/Chicago | | | `EST` `EDT` `ET` | America/New York | | | `AKST` | America/Anchorage | | | `HST` | Pacific/Honolulu | | | `BRT` | America/Sao Paulo | | | `BST` | Europe/London | | | `WET` | Europe/Lisbon | | | `CET` `CEST` | Europe/Paris | | | `EET` `EEST` | Europe/Athens | | | `MSK` | Europe/Moscow | | | `IST` | Asia/Kolkata | | | `PKT` | Asia/Karachi | | | `ICT` | Asia/Bangkok | | | `SGT` | Asia/Singapore | | | `HKT` | Asia/Hong Kong | | | `JST` | Asia/Tokyo | | | `KST` | Asia/Seoul | | | `AWST` | Australia/Perth | | | `AEST` `AEDT` | Australia/Sydney | | | `NZST` `NZDT` | Pacific/Auckland | | | `UTC` `GMT` | Coordinated Universal Time | `noon UTC in New York` → | | `time in …` | The current time somewhere | `time in New York` → | | `UTC+5` `GMT-3` `UTC+5:30` | Fixed offsets | `3pm in UTC+5:30` → | | `san francisco` `silicon valley` `seattle` `california` `boston` `miami` `atlanta` `washington` `nyc` `dallas` `houston` `austin` `texas` `hawaii` `beijing` `china` `mumbai` `delhi` `new delhi` `bangalore` `india` `japan` `korea` `south korea` `hong kong` `kyiv` `uk` `england` `britain` `france` `germany` `spain` `italy` `netherlands` `brazil` `são paulo` `australia` `new zealand` | Places and countries, plus every city in the time zone database (Lisbon, Denver, Nairobi…) | `time in Tokyo` → | ### Currencies Put a symbol or code before or after the amount ($30, 30 USD, EUR 20). All 166 ISO codes work in uppercase; common ones also in lowercase. | Write | Meaning | Example | |---|---|---| | `$` | USD | `$100` → $100.00 | | `€` | EUR | `€100` → €100.00 | | `£` | GBP | `£100` → £100.00 | | `¥` | JPY | `¥100` → ¥100 | | `₹` | INR | `₹100` → ₹100.00 | | `₩` | KRW | `₩100` → ₩100 | | `₽` | RUB | `₽100` → RUB 100.00 | | `₺` | TRY | `₺100` → TRY 100.00 | | `₪` | ILS | `₪100` → ₪100.00 | | `₫` | VND | `₫100` → ₫100 | | `₴` | UAH | `₴100` → UAH 100.00 | | `₦` | NGN | `₦100` → NGN 100.00 | | `฿` | THB | `฿100` → THB 100.00 | | `₱` | PHP | `₱100` → ₱100.00 | | `₿` | BTC | `₿100` → 100 BTC | | `dollar` `dollars` `buck` `bucks` `us dollar` `us dollars` | USD | | | `euro` `euros` | EUR | | | `pound sterling` `pounds sterling` `british pound` `british pounds` `quid` | GBP | | | `yen` `japanese yen` | JPY | | | `yuan` `renminbi` `rmb` `chinese yuan` | CNY | | | `rupee` `rupees` `indian rupee` `indian rupees` | INR | | | `franc` `francs` `swiss franc` `swiss francs` | CHF | | | `canadian dollar` `canadian dollars` | CAD | | | `australian dollar` `australian dollars` | AUD | | | `new zealand dollar` `new zealand dollars` | NZD | | | `hong kong dollar` `hong kong dollars` | HKD | | | `singapore dollar` `singapore dollars` | SGD | | | `peso` `pesos` `mexican peso` `mexican pesos` | MXN | | | `reais` `brazilian real` `brazilian reais` | BRL | | | `won` `korean won` | KRW | | | `ruble` `rubles` `rouble` `roubles` | RUB | | | `lira` `turkish lira` | TRY | | | `krona` `swedish krona` `swedish kronor` | SEK | | | `krone` `norwegian krone` `norwegian kroner` | NOK | | | `danish krone` `danish kroner` | DKK | | | `zloty` `zlotys` | PLN | | | `rand` | ZAR | | | `shekel` `shekels` | ILS | | | `baht` | THB | | | `dong` | VND | | | `ringgit` | MYR | | | `rupiah` | IDR | | | `dirham` `dirhams` | AED | | | `riyal` `riyals` | SAR | | | `usd` `eur` `gbp` `jpy` `cny` `inr` `chf` `cad` `aud` `nzd` `hkd` `sgd` `sek` `nok` `dkk` `pln` `czk` `huf` `mxn` `brl` `krw` `zar` `rub` `ils` `thb` `myr` `idr` `vnd` `aed` `sar` `ars` `clp` `cop` `twd` | Codes that also work in lowercase | `100 eur in usd` → $111.11 | | `BTC` `bitcoin` `bitcoins` | Crypto (BTC) | | | `ETH` `ether` `ethereum` | Crypto (ETH) | | | `SOL` `solana` | Crypto (SOL) | | | `DOGE` `dogecoin` `dogecoins` | Crypto (DOGE) | | | `LTC` `litecoin` `litecoins` | Crypto (LTC) | | | `XRP` `ripple` | Crypto (XRP) | | | `ADA` `cardano` | Crypto (ADA) | | | `USDT` `tether` | Crypto (USDT) | | | `USDC` | Crypto (USDC) | | | `sat` `sats` `satoshi` `satoshis` | Satoshis: 0.00000001 BTC | `100k sats in USD` → $100.00 | ### Cooking ingredients Name one of these on a line, and cups, spoons and ml convert to grams or ounces and back. Weights are approximate. For anything else, give its weight per cup: almond flour = 96 g/cup. | Write | Meaning | Example | |---|---|---| | `flour` `all-purpose flour` `plain flour` `bread flour` | Converts between volume and weight | `1 cup flour in g` → 120 g | | `whole wheat flour` `wholemeal flour` | Converts between volume and weight | `1 cup whole wheat flour in g` → 113 g | | `sugar` `granulated sugar` `white sugar` `caster sugar` | Converts between volume and weight | `1 cup sugar in g` → 198 g | | `brown sugar` | Converts between volume and weight | `1 cup brown sugar in g` → 213 g | | `powdered sugar` `icing sugar` `confectioners' sugar` `confectioners sugar` | Converts between volume and weight | `1 cup powdered sugar in g` → 113 g | | `butter` | Converts between volume and weight | `1 cup butter in g` → 227 g | | `cocoa` `cocoa powder` | Converts between volume and weight | `1 cup cocoa in g` → 84 g | | `oats` `rolled oats` | Converts between volume and weight | `1 cup oats in g` → 89 g | | `water` | Converts between volume and weight | `1 cup water in g` → 236.5882 g | | `milk` | Converts between volume and weight | `1 cup milk in g` → 243.6859 g | | `honey` `maple syrup` | Converts between volume and weight | `1 cup honey in g` → 336 g | | `oil` `olive oil` `vegetable oil` | Converts between volume and weight | `1 cup oil in g` → 217.6612 g | ### Words that depend on context | Write | Meaning | Example | |---|---|---| | `in` | Converts when a unit, format or place follows; otherwise inches right after a number | `6 ft 2 in` → 6.1667 ft | | `min` | Minutes after an amount; otherwise the smallest answer above | `5 min` → 5 min | | `x` | Times between two numbers; otherwise a variable, if defined | | | `may` | A month only when a day follows (may 5) | | | `sat` `sun` | sat means satoshis. Weekday abbreviations (sat, sun, mon…) only count after next, last or this | `next sat` → | | `now` `today` | Ordinary words when a number follows them directly ("I now have 5") | | | `and` `or` `not` `if` | Logic words only between or before values, and if only with a then; otherwise they are text ("salt and pepper") | | | `any name` | Variables win over units and keywords: after F = 5, "72 F" is 72 × 5 | | ## Units Every unit, with all the ways to write it. Symbols match exactly; names ignore case. ### Length | Unit | Also written | |---|---| | `nm` | nanometer, nanometers, nanometre, nanometres | | `µm` | μm, um, micrometer, micrometers, micrometre, micrometres, micron, microns | | `mm` | millimeter, millimeters, millimetre, millimetres | | `cm` | centimeter, centimeters, centimetre, centimetres | | `m` | meter, meters, metre, metres | | `km` | kilometer, kilometers, kilometre, kilometres | | `in` | ″, inch, inches | | `ft` | ′, foot, feet | | `yd` | yard, yards | | `mi` | mile, miles | | `nmi` | nautical mile, nautical miles | | `au` | AU, astronomical unit, astronomical units | | `ly` | light year, light years, lightyear, lightyears | | `px` | pixel, pixels | | `pt` | | | `em` | | | `rem` | | ### Area | Unit | Also written | |---|---| | `mm²` | mm2, square millimeter, square millimeters, sq mm | | `cm²` | cm2, square centimeter, square centimeters, sq cm | | `m²` | m2, sqm, square meter, square meters, square metre, square metres, sq m | | `km²` | km2, square kilometer, square kilometers, square kilometre, square kilometres, sq km | | `in²` | in2, square inch, square inches, sq in | | `ft²` | ft2, sqft, square foot, square feet, sq ft | | `yd²` | yd2, square yard, square yards, sq yd | | `mi²` | mi2, square mile, square miles, sq mi | | `ha` | hectare, hectares | | `acre` | ac, acre, acres | ### Volume | Unit | Also written | |---|---| | `mL` | ml, milliliter, milliliters, millilitre, millilitres | | `cL` | cl, centiliter, centiliters, centilitre, centilitres | | `dL` | dl, deciliter, deciliters, decilitre, decilitres | | `L` | l, liter, liters, litre, litres | | `cm³` | cm3, cc, cubic centimeter, cubic centimeters, cubic centimetre, cubic centimetres | | `m³` | m3, cubic meter, cubic meters, cubic metre, cubic metres | | `in³` | in3, cubic inch, cubic inches | | `ft³` | ft3, cubic foot, cubic feet | | `gal` | gallon, gallons | | `qt` | quart, quarts | | `pint` | pint, pints | | `cup` | cup, cups | | `fl oz` | floz, fl oz, fluid ounce, fluid ounces | | `tbsp` | tablespoon, tablespoons | | `tsp` | teaspoon, teaspoons | ### Mass | Unit | Also written | |---|---| | `mg` | milligram, milligrams, milligramme, milligrammes | | `g` | gram, grams, gramme, grammes | | `kg` | kilogram, kilograms, kilogramme, kilogrammes, kilo, kilos | | `t` | tonne, tonnes, metric ton, metric tons | | `oz` | ounce, ounces | | `lb` | lbs, pound, pounds | | `st` | stone, stones | | `ton` | ton, tons, short ton, short tons | ### Time | Unit | Also written | |---|---| | `ns` | nanosecond, nanoseconds | | `µs` | μs, microsecond, microseconds | | `ms` | millisecond, milliseconds | | `s` | sec, secs, second, seconds | | `min` | mins, minute, minutes | | `h` | hr, hrs, hour, hours | | `day` | d, day, days | | `week` | wk, wks, week, weeks | | `month` | mo, month, months | | `year` | yr, yrs, year, years | | `decade` | decade, decades | | `century` | century, centuries | ### Temperature | Unit | Also written | |---|---| | `K` | kelvin, kelvins | | `°C` | C, degC, celsius, centigrade, degree celsius, degrees celsius | | `°F` | F, degF, fahrenheit, degree fahrenheit, degrees fahrenheit | ### Data | Unit | Also written | |---|---| | `bit` | bits, bit | | `B` | byte, bytes | | `KB` | kB, kb, kilobyte, kilobytes | | `MB` | mb, megabyte, megabytes | | `GB` | gb, gigabyte, gigabytes | | `TB` | tb, terabyte, terabytes | | `PB` | pb, petabyte, petabytes | | `kbit` | Kbit, Kb, kilobit, kilobits | | `Mbit` | Mb, megabit, megabits | | `Gbit` | Gb, gigabit, gigabits | | `Tbit` | Tb, terabit, terabits | | `KiB` | kib, kibibyte, kibibytes | | `MiB` | mib, mebibyte, mebibytes | | `GiB` | gib, gibibyte, gibibytes | | `TiB` | tib, tebibyte, tebibytes | ### Data rate | Unit | Also written | |---|---| | `bps` | bit per second, bits per second | | `kbps` | Kbps, kilobit per second, kilobits per second | | `Mbps` | megabit per second, megabits per second | | `Gbps` | gigabit per second, gigabits per second | ### Angle | Unit | Also written | |---|---| | `rad` | radian, radians | | `°` | deg, degree, degrees | ### Speed | Unit | Also written | |---|---| | `mph` | miles per hour | | `kph` | kmh, kilometers per hour, kilometres per hour | | `kn` | kt, knot, knots | ### Energy | Unit | Also written | |---|---| | `J` | joule, joules | | `kJ` | kilojoule, kilojoules | | `cal` | calorie, calories | | `kcal` | Cal, kilocalorie, kilocalories | | `Wh` | watt hour, watt hours | | `kWh` | kilowatt hour, kilowatt hours | | `BTU` | btu | ### Power | Unit | Also written | |---|---| | `W` | watt, watts | | `kW` | kilowatt, kilowatts | | `MW` | megawatt, megawatts | | `hp` | horsepower | ### Pressure | Unit | Also written | |---|---| | `Pa` | pascal, pascals | | `kPa` | kilopascal, kilopascals | | `bar` | bar, bars | | `psi` | | | `atm` | atmosphere, atmospheres | | `mmHg` | | ### Force | Unit | Also written | |---|---| | `N` | newton, newtons | ### Frequency | Unit | Also written | |---|---| | `Hz` | hertz | | `kHz` | kilohertz | | `MHz` | megahertz | | `GHz` | gigahertz | ## Links that open a note Reckon has no server API, because it's a static site. Instead, three kinds of links open notes: | Link | Use | |---|---| | `https://parmsam.github.io/reckon/#/new?text=` | **Plain-text link.** The note is [percent-encoded](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent): space `%20`, new line `%0A`, `$` `%24`, `%` `%25`, `+` `%2B`, `#` `%23`, `&` `%26`. Easy to write by hand, by an LLM, or in any language. | | `https://parmsam.github.io/reckon/#/share//` | **Share link.** The note as raw DEFLATE, then base64url without padding. Shorter for long notes. The `/` part (letters, digits and `-`) is only a label and can be left out. | | `https://parmsam.github.io/reckon/#/note/` | Older links to a note saved in *this* browser. The app no longer shows them (the address stays `https://parmsam.github.io/reckon/`), and they don't work for anyone else. | Plain-text and share links open as a read-only preview with a *Save a copy* button, so a link can never change someone's notes. The decoder forgives common slips: a raw `+` stays a plus, and a bare `%` (as in `20% of`) is kept. ```js const link = 'https://parmsam.github.io/reckon/#/new?text=' + encodeURIComponent(note); ``` ```python from urllib.parse import quote link = "https://parmsam.github.io/reckon/#/new?text=" + quote(note, safe="") # Shorter share link, same format the app uses: import base64, zlib c = zlib.compressobj(9, zlib.DEFLATED, -15) # raw DEFLATE payload = base64.urlsafe_b64encode(c.compress(note.encode()) + c.flush()).rstrip(b"=").decode() link = "https://parmsam.github.io/reckon/#/share/" + payload ``` ## The engine module [`engine.js`](https://parmsam.github.io/reckon/engine.js) is Reckon's calculation engine as one self-contained ES module (about 60 KB gzipped). It works in browsers, Node 18+, Deno and notebooks, makes no network requests unless you ask for rates, and includes a recent set of exchange rates. ```js import { evaluate, noteLink, shareLink } from 'https://parmsam.github.io/reckon/engine.js'; // Deno, browsers // Node: download it first (curl -O https://parmsam.github.io/reckon/engine.js), then import('./engine.js') evaluate('hourly rate = $85/h\n37.5 h × hourly rate\n5 km in miles'); // [ // { line: 1, input: 'hourly rate = $85/h', kind: 'value', result: '$85.00/h', variable: 'hourly rate' }, // { line: 2, input: '37.5 h × hourly rate', kind: 'value', result: '$3,187.50' }, // { line: 3, input: '5 km in miles', kind: 'value', result: '3.1069 mi' }, // ] ``` | Export | What it does | |---|---| | `evaluate(text, options?)` | Evaluates a note; returns one `{ line, input, kind, result?, error?, variable? }` per line. Options: `locale`, `now` (epoch ms), `timeZone`, `rates`, `precision`, `unitPrecision`, `angleUnit`, `ppi`, `emPx`. | | `noteLink(text)` | A plain-text link that opens `text` in Reckon. | | `shareLink(text)` | A compressed share link (async). | | `decodeShare(payload)` | The note inside a share link (async). | | `toText(text, options?)` | The note with each answer aligned after its line. | | `toMarkdown(text, options?)` | The note as Markdown: headings, comments, and `\| Line \| Answer \|` tables. | | `toHtml(text, options?)` | The note as a standalone HTML page (`options.title` sets its title). | | `fetchFiatRates()`, `fetchCryptoRates()` | Live rates (units per USD) to pass as `options.rates`. | | `bundledRates` | The rates built into this version, with `fetchedAt`. | | `evaluateDocument(text, settings)` | The lower-level engine call, with structured values. | ## For LLMs and agents - **[llms.txt](https://parmsam.github.io/reckon/llms.txt)** and **[llms-full.txt](https://parmsam.github.io/reckon/llms-full.txt)** describe Reckon for language models ([llmstxt.org](https://llmstxt.org)). The full file contains the whole syntax reference. - **[The prompt](https://parmsam.github.io/reckon/prompt.txt)** (below) teaches any chat assistant to write Reckon notes and answer with a link you can click. - **[The agent skill](https://parmsam.github.io/reckon/skill/SKILL.md)** teaches coding agents (such as Claude Code) to write notes, build links and check answers with the engine. Install it by copying `skills/reckon/` from the [repository](https://github.com/parmsam/reckon) into your agent's skills folder. ## Prompt for chat assistants ``` You help people write notes for Reckon (https://parmsam.github.io/reckon/), a notepad calculator. In Reckon, each line of text is a calculation, and the app shows its answer beside the line. You write the note; Reckon does the math, so never compute or write the answers yourself. How to write a Reckon note: - One calculation per line. Descriptive words are fine and ignored: "flights: $420 × 2". - "# Title" lines are headings, and "//" starts a comment. - Name values with "=" and reuse them below: "hourly rate = $85/h", then "37.5 h × hourly rate". Names can have spaces. Don't reuse unit or keyword names as variables. - "sum", "avg", "count", "min", "max" cover the lines above, back to the last heading or blank line. Lines that themselves use sum/avg are left out, so put a blank line or heading between groups. - "prev" is the previous answer. - Define reusable pieces: functions ("tip(bill, rate) = bill × rate") and units ("1 sprint = 2 weeks"). - Compare and branch: "if total > $100 then 10% off total else total". - Units, currencies and dates work as written below. Convert with "in": "5 km in miles". - Type numbers with a dot for decimals and commas for thousands: 1,234.5. Every line Reckon understands, with the answer it shows (answers use sample rates, and dates assume Thursday, Jan 15, 2026): Basics: 2 + 3 × 4 → 14 (2 + 3) × 4 → 20 2^10 → 1,024 10 mod 3 → 1 5! → 120 0.1 + 0.2 → 0.3 Numbers: 1,000,000 + 1_000 → 1,001,000 1.5k + 2M → 2,001,500 3bn / 1 million → 3,000 1.5e3 → 1,500 0xFF + 0b1010 → 265 1½ → 1.5 Text and structure: 3 apples + 2 apples → 5 rent: 1,200 → 1,200 5 plus 3 times 2 → 11 10 divided by 4 → 2.5 Variables: monthly rent = 1,200 → 1,200 utilities = 150 → 150 (monthly rent + utilities) × 12 → 16,200 Your own functions and units: tip(bill, rate) = bill × rate tip($80, 18%) → $14.40 1 sprint = 2 weeks → 2 weeks 3 sprints in days → 42 days 1 dozen = 12 → 12 3 dozen → 36 Previous answers and totals: groceries: 80 → 80 gas: 45 → 45 dinner: 55 → 55 sum → 180 median → 55 avg → 60 prev × 2 → 120 rent: 1,200 → 1,200 power: 80 → 80 subtotal → 1,280 food: 300 → 300 subtotal → 300 grand total → 1,580 lunch $12 #food → $12.00 taxi $30 #travel → $30.00 dinner $45 #food → $45.00 sum #food → $57.00 Percentages: 20% of 50 → 10 50 + 10% → 55 10% off $80 → $72.00 5 as % of 20 → 25% 5 is what % of 20 → 25% 20% of what is 5 → 25 Comparisons and conditions: 5 km > 3 miles → true 0.1 + 0.2 == 0.3 → true order = $120 → $120.00 if order >= $100 then 10% off order else order → $108.00 0xF0 | 0x0F → 255 Choices: transport = car | [train] | fly → train if transport == train then $80 else $300 → $80.00 fare = car $120 | [train $80] | fly $300 → $80.00 Units: 5 km in miles → 3.1069 mi 6 ft 2 in in cm → 187.96 cm 72 °F in °C → 22.2222 °C 2 cups in ml → 473.1765 mL 1 GB / 4 MB → 250 60 mph in km/h → 96.5606 km/h 3 m × 4 m → 12 m² 1 m + 20 cm → 1.2 m 12pt in px → 16 px 2 cups flour in g → 240 g Money: $30 in EUR → €27.00 €20 + $5 → €24.50 hourly rate = $85/h → $85.00/h 37.5 h × hourly rate → $3,187.50 0.01 BTC in USD → $1,000.00 Dates and times: today + 2 weeks → Thu, Jan 29 next friday at 3pm → Fri, Jan 16, 3:00 PM days until Dec 25 → 344 days Jan 31 + 1 month → Sat, Feb 28 3pm + 90 min → 4:30 PM 3 days ago → Mon, Jan 12 Time zones: time in Tokyo → 9:00 PM GMT+9 3pm PST in London → 11:00 PM GMT 9:00 EST to CET → 3:00 PM GMT+1 Functions and formats: sqrt(16) + cbrt(27) → 7 round(3.14159, 2) → 3.14 sin(30) → 0.5 log(1000) → 3 2pi → 6.2831853072 255 in hex → 0xFF 1500 in sci → 1.5e3 When you've written the note, reply with: 1. A link that opens it. If you can run code, prefer a compressed share link (shorter): import base64, zlib c = zlib.compressobj(9, zlib.DEFLATED, -15) payload = base64.urlsafe_b64encode(c.compress(note.encode()) + c.flush()).rstrip(b"=").decode() link = "https://parmsam.github.io/reckon/#/share/" + payload Otherwise write a plain-text link: https://parmsam.github.io/reckon/#/new?text= followed by the note percent-encoded. Encode every character except A–Z a–z 0–9 - _ . ~ (as JavaScript's encodeURIComponent does): space %20, new line %0A, $ %24, % %25, + %2B, # %23, & %26, = %3D, : %3A, / %2F, ( %28, ) %29, × %C3%97, € %E2%82%AC, ° %C2%B0. 2. The note itself in a code block, so it can be pasted if the link is too long. Example. For "a quick trip budget", the note is: # Trip budget flights: $420 × 2 hotel = 3 nights × $135 food: 25% of hotel sum and the plain-text link is: https://parmsam.github.io/reckon/#/new?text=%23%20Trip%20budget%0Aflights%3A%20%24420%20%C3%97%202%0Ahotel%20%3D%203%20nights%20%C3%97%20%24135%0Afood%3A%2025%25%20of%20hotel%0Asum ```