Calculator Features
This page is mostly a duplicate of the "Welcome to NumPad" document that is shown by default when you visit NumPad. It will probably be more helpful to view that document as it's interactive and shows inline results. However it is possible to lose or edit that document; if this has happened to you, I recommend loading NumPad in a private browser window to see it again.
Arithmetic
NumPad has all the basics
1 + 1
2 - 1
2 * 2
5 / 2
You can also use "per" to divide and "to" to subtract, although "to" subtracts the left hand side from the right hand side
20 miles per gallon
30 to 50
And a "to the power of" operator
3^2
And "mod" for modulo arithmetic
15 mod 12
Units and Conversions
NumPad has a lot of built in units
9.8 m/s^2
3.6 roentgen
You can naturally combine units like feet and inches
6 foot 2 inches
You can add and subtract units of the same dimension
2kg + 1lb
2 miles - 1km
The "in" operator converts between units
£200 in USD
100kg + 20lbs in tonnes
You can multiply and divide units even if they don't have the same dimensions
20kg * 9.8m/s^2
20 litres/minute
And raise them to powers or root them
3feet^3 in l
sqrt(20 acres) in m
NumPad even automatically handles conversions between units that are the inverse of one another
26.2 miles / 3 hours 30 minutes in min/km
4.6L/100km in miles / gallon
Variables
You can declare variables with the "=" sign and variable names can even contain spaces and apostrophes
Alice's food = £30
Bob's food = £25
VAT = 20%
Alice's food + Bob's food + VAT
Line References
Line references are like variables, but they let you refer to the value of another line whether that line without declaring a variable. For clarity, I've started each line in the following examples with a line number, but you should not copy these into a NumPad document. NumPad can display line numbers in a column to the left of documents. If you don't see these you can go to settings and tick "show line numbers".
1 | 100
2 | line 1 * 2
3 | Line 1 * 3
Line references behave dynamically, so if you insert new lines before the line that's being referred to, your line reference will update to point to its line's new line number.
Line references are useful generally, but especially useful for ranges in functions.
Percentages
There is support for all the main percentage operations
10% of $200
$200 + 10%
$200 - 10%
$40 as a % of $50
$60 as a % on $50
$40 as a % off $50
5% of what is $6
5% on what is $210
5% off what is $190
Dates and Times
NumPad has support for times...
10:10
17:30 - 2 hours 20 minutes
...dates...
30th Sept
1st January 1970 + 3 months
...and times with dates
13:00 16th August 2022 - 2 weeks
Notice that times with unspecified dates default to the current day, dates with unspecified years default to the current year, and dates without unspecified times default to midday.
Functions
There are functions for finding the sum, mean, average and median of a list of numbers. Average is just an alias for the mean.
sum(1, 2, 3)
mean(1, 2, 3)
average(1, 2, 3)
median(1, 2, 20)
You can also give these functions a range
. You can make a range by putting a colon between two line references, this is the same as passing the function all of the values of those line references. Ranges are inclusive, so line 1 : line 4
will include lines 1 and 4.
1 | 10
2 | 20
3 | 30
4 | 40
5 |
6 | sum(line 1 : line 4)
Ranges behave dynamically so that if you insert new lines between the lines of a range your range will be expanded to accomodate that line. Likewise they will contract if you remove lines in the range.
The sum, mean and median of all the values of the document are also shown in the bottom right hand corner of the window, though only when all values have the same dimension (e.g. all dollars, or all distances).
There are built in square root (sqrt) and cube root (cbrt) functions
sqrt(9)
cbrt(27)
Although if you want to find roots higher than 3 you'll have to raise your value to a fractional power, e.g.
81^1/4
There is also support for basic trigonometry functions and their inverses
sin(90 degrees)
arccos(1) in degrees
There are natural logarithm "ln" and base 10 logarithm "log" functions too
ln(e)
log(1000)
Constants
NumPad has the following constants built in, you can add your own with variable assignment
pi
PI
e
Bases and base conversion
You can express numbers in binary, octal, and hexadecimal with the prefixes "0b", "0o", and "0x" respectively
0b101010
0o777
0xcab1
You can convert them using the "in" operator
4011 in hex
0o52 in decimal
51889 in hexadecimal
0xcab1 in binary
64 in octal