October 18, 2026
Trend lines, bell curves and angles in a calculator
The first batch of new functions covered what a quote or eligibility calculator needs. This one goes further: predicting from past numbers, ranking a score, and the maths behind a few common formulas.
A trend line
slope(xs, ys) and intercept(xs, ys) give the best-fit straight line through paired lists, like Excel’s SLOPE and INTERCEPT. Say sales were 100, 120, 135 and 155 in months 1 to 4:
.list months: Month number
.list sales: Sales (RM)
.input next: Month to predict positive
.r1 Growth per month (RM): slope(months, sales)
.r2 Predicted sales (RM): intercept(months, sales) + r1 × next
The line grows 18 a month and starts at 82.50, so month 6 comes out at 190.50. If every x is the same there is no line to fit, and the calculator says so instead of guessing.
Bell curves
normdist(x, mean, sd) is the chance a normally spread value lands at or below x. norminv(p, mean, sd) goes the other way.
.input score: Your score
.input average: Average score
.input sd: Spread (standard deviation) positive
.r1 Share of people at or below you: normdist(score, average, sd) × 100
With a score of 70 against an average of 50 and a spread of 10, that is about 97.7%. And norminv(0.975, 0, 1) is 1.95996, the familiar 1.96 behind a 95% interval.
Past 10 standard deviations from the mean, normdist returns 0 or 1, which is off by less than 0.00000000000000000000001. norminv refuses a probability that close to 0 or 1.
Angles, counting and powers
pi(),sin,cosandtan, with angles in radians. For degrees, multiply bypi() ÷ 180.sin(pi())is exactly 0, not a tiny leftover.factorial(n)up to 1000, andchoose(n, k), the ways to pickkout ofn.choose(49, 6)is 13,983,816.pownow takes fractions:pow(8, 1 ÷ 3)is 2. The base must be above zero.
What this is not
These functions cover a lot of ground, but tinymath is still a calculator language. There are no loops, no matrices and no training, so no machine learning beyond a model with weights you type in. A logistic or linear model with fixed weights is a few lines of sumproduct and exp. Anything that has to learn its own weights is a different tool.
One small change on the side: a function name is only a function when a bracket follows it, so a variable can be called mean or slope.
All of it is in the Dotdown™ functions guide.