grokkingstuffHomeBlogProjectsWikiCalculatorsAbout

Probability, finance & utilities

modified2026-07-23statusfinished

Eleven combinatorics, finance & utility calculators: factorial & derangement, combinations & permutations, polyhedral dice probability, time card work hours, payroll & overtime, non-metric fractional adding machine, aviation wind triangle, BMI & ideal mass, vehicle fuel consumption & MPG, cricket chirp thermometer, and compound interest. (For birthday paradox see birthday paradox.)

Index

Factorial & derangement ($!n$)

[10.1] Combinatorial counts

$$n!=\prod_{k=1}^n k,\qquad !n\approx\biggl\lfloor\frac{n!}{e}+0.5\biggr\rfloor$$

Combinations & permutations

[10.2] $n$C$r$ & $n$P$r$

$$n\text{C}r=\frac{n!}{r!(n-r)!},\quad n\text{P}r=\frac{n!}{(n-r)!}$$

Polyhedral dice probability

[10.3] Dice sum distributions

$$P(S)=\frac{\text{WayCount}(S,s,n)}{s^n}$$

Exact probability of hitting or exceeding a target sum on s-sided dice.

Time card work hours

[10.5] Clock time arithmetic

$$H_{\text{total}}=\sum(t_{\text{out}}-t_{\text{in}})-t_{\text{break}}$$

Payroll & overtime

[10.6] Gross pay

$$\text{Gross}=\min(H,40)\cdot R+\max(0,H-40)\cdot(1.5R)$$

Non-metric fractional adding machine

[10.7] Feet-inches-fractions

$$\text{Total}=\text{Feet}\times12+\text{Inches}+\frac{\text{Num}}{\text{Denom}}$$

Enter: ft in num/denom (e.g. 3 5 3/8). One per line.

Aviation wind triangle

[10.8] Wind correction

$$\text{WCA}=\arcsin\!\left(\frac{V_w\sin(\theta_w-\theta_c)}{V_{\text{TAS}}}\right),\quad V_{\text{GS}}=V_{\text{TAS}}\cos\text{WCA}+V_w\cos(\theta_w-\theta_c)$$

BMI & ideal mass

[10.9] Body mass index

$$\text{BMI}=\frac{\text{kg}}{\text{m}^2}=703\frac{\text{lbs}}{\text{in}^2}$$

Fuel consumption & MPG

[10.10] MPG converter

$$\text{L/100km}=\frac{235.215}{\text{MPG}_{\text{US}}}$$

Cricket chirp temperature

[10.11] Dolbear's law

$$T_{^\circ\text{F}}=N_{15\text{s}}+40,\quad T_{^\circ\text{C}}=\frac{N_{8\text{s}}+5}{7}$$

Compound interest

[10.12] Compound interest

$$A=P\!\left(1+\frac{r}{n}\right)^{nt},\quad\text{APY}=\left(1+\frac{r}{n}\right)^n-1$$