Math Formula Encyclopedia
Every formula comes with a calculator, a picture that moves with your values, and how it is used in game development.
Numbers, Algebra & Functions
Percentages, linear functions, the quadratic formula, exponents, logarithms and sequences — the building blocks of calculation.
Geometry (Area & Volume)
The Pythagorean theorem, areas of circles, triangles, trapezoids and sectors, and volumes and surface areas of solids.
a² + b² = c²Area and Circumference of a CircleS = πr² ℓ = 2πrArea of a TriangleS = base × height ÷ 2Area of a TrapezoidS = (a + b) × h ÷ 2Area and Arc Length of a SectorS = πr² × (angle ÷ 360) ℓ = 2πr × (angle ÷ 360)Interior Angles of a PolygonSum of interior angles = 180° × (n − 2)Volume and Surface Area of a CuboidV = abc S = 2(ab + bc + ca)Volume and Surface Area of a CylinderV = πr²h S = 2πr² + 2πrhVolume and Surface Area of a ConeV = πr²h ÷ 3 S = πr² + πrℓ (ℓ = √(r² + h²))Volume and Surface Area of a SphereV = 4πr³ ÷ 3 S = 4πr²Trigonometry
What sin, cos and tan mean, degrees and radians, the laws of sines and cosines, sine waves and the addition formulas.
sin θ = y/r cos θ = x/r tan θ = y/xDegrees and Radiansradians = degrees × π ÷ 180Law of Sinesa / sin A = b / sin B = c / sin C = 2RLaw of Cosinesa² = b² + c² − 2bc cos ASine Wavesy = A sin(2πft + φ)Angle Addition Formulassin(α + β) = sin α cos β + cos α sin β
cos(α + β) = cos α cos β − sin α sin βProbability & Statistics
Mean, median, variance and standard deviation, permutations and combinations, binomial and normal distributions, expected value and drop rates.
mean = sum ÷ countVariance and Standard Deviationσ² = Σ(x − x̄)² ÷ n σ = √σ²Permutations and CombinationsₙPᵣ = n! ÷ (n − r)! ₙCᵣ = n! ÷ (r!(n − r)!)Binomial DistributionP(X = k) = ₙCₖ pᵏ (1 − p)ⁿ⁻ᵏProbability of at Least One Success (Drop Rates)P(at least once) = 1 − (1 − p)ⁿExpected ValueE = Σ xᵢ pᵢNormal Distributionf(x) = 1 ÷ (σ√(2π)) · e^(−(x − μ)² ÷ 2σ²)Vectors & Matrices
Vector addition and length, unit vectors, dot and cross products, matrix multiplication and rotation matrices.
a + b = (a₁ + b₁, a₂ + b₂) |a| = √(a₁² + a₂²)Unit Vectors (Normalization)e = a ÷ |a|Dot Product and the Angle Between Vectorsa · b = a₁b₁ + a₂b₂ = |a||b| cos θCross Product (2D)a × b = a₁b₂ − a₂b₁ (2D)Matrix–Vector Multiplication and Determinant(X, Y) = (a x + b y, c x + d y) det = ad − bcRotation MatrixX = x cos θ − y sin θ Y = x sin θ + y cos θCoordinate Geometry
Distance between two points, internal division, polar coordinates and the direction between two points (atan2).
Math for Game Development
Collision detection, linear interpolation, easing, Bézier curves, projectile paths, reflection and pseudo-random numbers — calculations games use every frame.
A.x < B.x + B.w and B.x < A.x + A.w and A.y < B.y + B.h and B.y < A.y + A.hCircle Collision(x₂ − x₁)² + (y₂ − y₁)² ≤ (r₁ + r₂)²Linear Interpolation (lerp)lerp(a, b, t) = a + (b − a) tEasing Functionssmoothstep(t) = t²(3 − 2t) easeInQuad(t) = t²Cubic Bézier CurvesB(t) = (1−t)³P₀ + 3(1−t)²t P₁ + 3(1−t)t² P₂ + t³P₃Projectile Pathrange R = v² sin 2θ ÷ g peak H = (v sin θ)² ÷ 2gReflection Vectorr = d − 2(d · n)nPseudo-Random Numbers (xorshift)x ^= x << 13; x ^= x >> 17; x ^= x << 5Sources
- 文部科学省「平成29・30・31年改訂学習指導要領(本文、解説)」
- OpenStax, College Algebra 2e (CC BY 4.0)
- OpenStax, Precalculus 2e (CC BY 4.0)
- OpenStax, Introductory Statistics 2e (CC BY 4.0)
- NIST Digital Library of Mathematical Functions
- MDN Web Docs — 2D collision detection
- W3C, CSS Easing Functions Level 1
- G. Marsaglia, “Xorshift RNGs”, Journal of Statistical Software 8(14), 2003
- OpenStax, University Physics Volume 1 (CC BY 4.0)
Checked: 2026-11-29