My Calculator Stack · Math formulas

Math · Formula sheet

Math formulas

One printable sheet for 27 Math tools — formulas collected from each calculator’s How it works.

Math calculators →

Binary Calculator

Open tool →
\[ n = \sum b_i 2^{i} \]

Each bit is a coefficient of a power of 2.

Euler Totient Calculator

Open tool →
\[ \varphi(n) = n \prod_{p\mid n}\left(1-\frac{1}{p}\right) \]

Enter a positive integer n within the educational size limit. Related: Toy RSA Demonstrator.

Exponent Calculator

Open tool →
\[ a^{b} = e^{b \ln a} \]

General real powers use the exponential definition.

Extended GCD / Modular Inverse

Open tool →
\[ ax + my = \gcd(a,m) \]

Enter a and modulus m. If gcd ≠ 1, no modular inverse exists (shown as —). Related: Modular Exponentiation, Toy RSA Demonstrator.

\[ a^{-1} \equiv x \pmod m \]

When an inverse exists, a·inv ≡ 1 (mod m).

Fraction Calculator

Open tool →
\[ \tfrac{a}{b} = \tfrac{a/\gcd}{b/\gcd} \]

Simplify by dividing by the greatest common divisor.

\[ \tfrac{a}{b}+\tfrac{c}{d}=\tfrac{ad+bc}{bd} \]

Addition uses a common denominator.

GCD and LCM Calculator

Open tool →
\[ \mathrm{lcm}(a,b)=\frac{|ab|}{\mathrm{gcd}(a,b)} \]

Enter Integer a and Integer b for the GCD and LCM Calculator; use finite values in the indicated domain. The calculator reports GCD and LCM: GCD is the largest shared divisor; LCM is the least common multiple. When either integer is zero, check the LCM convention required by your application.

Hex Calculator

Open tool →
\[ n = \sum d_i 16^{i} \]

Each hex digit encodes four bits.

Linear Equation Calculator

Open tool →
\[ x=\frac{c-b}{a} \]

Enter a (coeff of x), b, and c for the Linear Equation Calculator; use finite values in the indicated domain. The calculator reports x: Isolate x by subtracting b and dividing by a. A zero a (coeff of x) means the equation has either no unique solution or infinitely many.

Log Base 2 Calculator

Open tool →
\[ \log_2 n = \frac{\ln n}{\ln 2} \]

Definition via change of base.

Log Calculator

Open tool →
\[ \log_b n = \frac{\ln n}{\ln b} \]

Change-of-base formula.

Matrix 2×2 Calculator

Open tool →
\[ \det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc \]

Enter a (1,1), b (1,2), c (2,1), and d (2,2) for the Matrix 2×2 Calculator; use finite values in the indicated domain. The calculator reports Determinant, Inv a, Inv b, Inv c, and Inv d: det = ad−bc; inverse is (1/det) times the adjugate. An inverse exists only when Determinant is nonzero.

Modular Exponentiation Calculator

Open tool →
\[ a^{e} \bmod m \]

Enter base a, exponent e, and modulus m (non-zero). Related tools: Extended GCD / Modular Inverse and Toy RSA Demonstrator.

Percent Given Value Calculator

Open tool →
\[ \frac{\text{part}}{\text{whole}} \times 100 \]

Divide the part by the whole, then multiply by 100.

Percentage Calculator

Open tool →
\[ \frac{P}{100} \times X \]

What is P% of X? Multiply the fraction of 100 by X.

\[ \frac{X}{Y} \times 100 \]

X is what percent of Y? Divide the part by the whole, then scale to 100.

\[ \frac{B - A}{A} \times 100 \]

Percent change from A to B measures how much the value grew or shrank relative to the starting amount.

Percentage Error Calculator

Open tool →
\[ \%\,\text{error} = \frac{|x_{\text{exp}} - x_{\text{th}}|}{|x_{\text{th}}|} \times 100 \]

Divide the absolute difference by the absolute theoretical value, then scale by 100.

Permutation and Combination Calculator

Open tool →
\[ P(n,r)=\frac{n!}{(n-r)!} \]

Permutations.

\[ C(n,r)=\frac{n!}{r!(n-r)!} \]

Combinations.

Prime Factors Calculator

Open tool →
\[ n = p_1^{e_1}\cdots p_k^{e_k} \]

Enter Integer ≥ 2 for the Prime Factors Calculator; use finite values in the indicated domain. The calculator reports Prime factors and Factor count: Prime factorization writes a number as a product of primes. The input must be a whole number of at least 2.

Proportion Calculator

Open tool →
\[ x=\frac{bc}{a} \]

Enter a, b, and c for the Proportion Calculator; use finite values in the indicated domain. The calculator reports x: Cross-multiply to solve a proportion. a must be nonzero because it is the divisor used to recover x.

Quadratic Equation Calculator

Open tool →
\[ x=\frac{-b\pm\sqrt{b^{2}-4ac}}{2a} \]

Enter a (x²), b (x), and c for the Quadratic Equation Calculator; use finite values in the indicated domain. The calculator reports Discriminant, Root 1, and Root 2: Roots come from the quadratic formula using the discriminant. Set a (x²) nonzero; a negative Discriminant has no real Root 1 or Root 2.

Remainder Calculator

Open tool →
\[ r = a \bmod b \]

Remainder after division.

Rounding Calculator

Open tool →
\[ \mathrm{round}(x,d)=\frac{\mathrm{round}(x\cdot 10^{d})}{10^{d}} \]

Scale, round to nearest integer, then scale back.

Scientific Calculator

Open tool →
\[ \sin,\ \cos,\ \tan\ \text{respect DEG/RAD};\quad \log=\log_{10} \]

Expressions use standard precedence with right-associative powers. Trig and inverse trig respect the DEG/RAD mode; hyperbolic functions are always in radians.

Significant Figures Calculator

Open tool →
\[ x' = \mathrm{round}(x;\, k\ \mathrm{sig.\ figs}) \]

Scale so the first digit is in a known place, round, then scale back.

Slope between two points

Two-point slope

\[ m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}} \]

x₂ ≠ x₁. Same units on each axis.

Horizontal line

\[ m = 0 \]

y₂ = y₁ and the points are distinct.

Vertical line

\[ x_{2} = x_{1} \]

Slope is undefined; do not divide by zero.

Point-slope form

\[ y - y_{1} = m(x - x_{1}) \]

A line through (x₁, y₁) with slope m.

Slope-intercept

\[ y = mx + b \]

b is the y-intercept when the line crosses x = 0.

Toy RSA Demonstrator

Open tool →
\[ c \equiv m^{e} \pmod n,\quad m \equiv c^{d} \pmod n \]

Pick distinct small primes p and q, a public exponent e coprime to φ(n), and a message integer m with 0 ≤ m < n. Related: Modular Exponentiation, Extended GCD / Modular Inverse, Euler Totient.

\[ d \equiv e^{-1} \pmod{\varphi(n)} \]

Never use these keys for real security; production RSA uses large random primes and audited libraries.

Two's (2's) Complement Calculator

Open tool →
\[ \mathrm{enc}(n) = n \bmod 2^{w} \]

For bit width w, values range from −2^(w−1) to 2^(w−1)−1; negative numbers wrap modulo 2^w.

Value Given Percent Calculator

Open tool →
\[ \text{value} = \text{whole} \times \frac{P}{100} \]

Multiply the whole by P/100.

Keep going

Open the category hub or browse every printable sheet.