Skip to content

Repository files navigation

Sumthing

A notepad for quick math. Too much for a calculator, too little for a spreadsheet? Just type. Mix math, conversions, currencies, and notes in plain text — answers appear as you go.

No AI. Works offline. Share via URL.

Demo here

cover

Example

days = 15

food: $12 * days          // $180
transport: $3.50 * days   // $52.50

sum                        // $232.50

Arithmetic

Standard math with natural language alternatives.

5 + 3
10 minus 5
5 * 3          // or 5 × 3, 5 x 3, 5 times 3
20 / 4         // or 20 ÷ 4, divided by, divided
2 ^ 10
(5 + 3) * 2
100 and 50     // addition
100 without 10 // subtraction
-5 + 3         // negative numbers

Numbers

100
3.14
1,000,000      // comma-separated
1,250.75       // commas with decimals
50K            // 50,000 (K suffix)
$100K          // $100,000

Currency

Symbols, prefixed symbols, and currency codes all work.

$100 + $50
€200 * 3
£500 - 10%
$50K + $25K
100 USD + 50 EUR
1000 JPY
¥1000 + ₹500

Symbols: $, , £, ¥, , , ฿, and the prefixed dollars AU$/A$, US$, NZ$, CA$/C$, HK$, S$, MX$, R$, plus CN¥.

Which dollar is $?

A bare $ is your own currency, from your timezone (falling back to browser language). In Sydney $100 is A$100; in New York it's US$100. Same for ¥, which is yen unless you're in China. If your currency doesn't use the symbol — kronor, say — $ stays US dollars.

To be explicit, name it. Both of these are AUD:

AU$100 in JPY
$100 AUD in JPY

Other currencies keep their qualifier so a conversion can't be misread as local money: 100 USD shows as US$100.00.

Guessed wrong? Some browsers (Brave, Tor) rewrite the language they report. Pin it from the console:

localStorage.sumthing_currency = 'aud'

Currency conversion

Convert between 20 supported currencies using live exchange rates. Rates are cached for 24 hours, so conversions keep working offline.

50 USD in EUR
$100 to GBP
1000 JPY in AUD
€500 as CAD
US$100 into NZD

Supported currencies: USD, EUR, GBP, AUD, CAD, NZD, JPY, CHF, CNY, INR, SGD, HKD, KRW, SEK, NOK, DKK, BRL, ZAR, MXN, THB

Percentages

20% of $500          // $100
10% off $30          // $27
50% on $100          // $150
100 + 20%            // 120 (adds 20%)
100 - 20%            // 80 (subtracts 20%)

Percentage queries

50 is what % of 200         // 25%
50 is 25% of what           // 200
100 to 150 is what %        // 50%
30 is 25% off what          // 40

Convert to percentage

0.75 as a percentage        // 75%
0.5 in a percent            // 50%

Variables

Use : or is to assign a variable (adds to the running sum). Use = for constants (not included in the sum).

days = 15
food: $12 * days
transport: $3.50 * days

Aggregation

Each of these consumes the : variables since the last aggregation.

sum        // or total — sums all : variables since last sum
avg        // or average
minimum    // or lowest
maximum    // or highest
count      // how many values
prev + 5   // previous result

Unit conversions

Convert between units with in, to, into, or as.

5km in m
10 feet to yards
100f to c
5km as miles
2l into ml

Supported units

Category Units
Length mm, cm, m/metres, km/kilometres, inch/inches ("), feet/ft ('), yard/yd, mile/mi
Mass mg, g/grams, kg/kilograms, oz/ounces, lb/lbs/pounds, stone, t/tonnes
Area sqm/m2/square metres, sqft/ft2/square feet, acre/acres, ha/hectares, sqkm/km2, sqmi
Volume ml, tsp, tbsp, floz, cup, pint/pt, quart/qt, l/litres, gallon/gal
Data b/bytes, kb, mb, gb, tb
Time ms, sec/seconds, min/minutes, hr/hours, day/days, week/weeks
Speed km/h (kph, kmh, kmph, kilometers per hour), mph (miles per hour), m/s (mps, meters per second), ft/s (fps, feet per second), kn/knot/knots
Temperature celsius/c, fahrenheit/f, kelvin/k

Results stay in metric by default, but units like lb, oz and sqft are kept when you use them: 5 lb + 3 lb is 8 lb, while 20kg plus 1900g is 21.9 kg.

Volume and mass units can be cross-converted using water density (1 ml = 1 g):

2 cups in ml
1 gallon in l
1.5tbsp in grams
100g in ml
How many cups in 1500 ml

Fractional units

No space between the fraction and the unit, or the / reads as division.

1/2inch + 1/4inch
3/4ft

Cross-unit arithmetic

60 km/h * 2hr     // 120 km (speed x time = distance)
120km / 60 km/h   // 2 hours (distance / speed = time)

Compound interest

$600 at 5% pa                              // 1 year, monthly compounding
$1000 for 5 years at 3% monthly
$600 for 10 years at 5% compounding quarterly
$1000 at 5% for 10 years                   // rate first also works
$1000 for 18 months at 6% monthly          // any time unit

Frequencies: monthly, quarterly, annually, yearly, daily, weekly (monthly if you don't say). A duration with no unit means years.

Timezone conversion

Convert times between 30+ timezones.

15:30 GMT in AEST
now in PST
3:30pm EST in UTC
8am GMT in JST

Supported timezones: UTC, GMT, BST, CET, CEST, EET, EEST, EST, EDT, CST, CDT, MST, MDT, PST, PDT, AKST, AKDT, HST, AEST, AEDT, ACST, AWST, NZST, NZDT, JST, KST, IST

Dates and time

today                  // current date
now                    // current date and time
5 days from now
2 hours from now
5 days ago
weeks in 4 years       // 208.71

Comments

// This is a comment
"normal price $65"     // quoted text is treated as a comment
---                    // separator line

About

A notepad for quick math. Mix math, conversions. Instant answers. No AI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages