# Peasy Math — Full Catalog > Math tools made easy. Peasy Math provides free browser-based tools at https://peasymath.com/. All processing happens client-side — files never leave your device. ## Tools (15) ### Percentage Calculator Calculate percentages, increases, decreases, and ratios Four percentage calculation modes: find a percentage of a number, find what percentage one number is of another, calculate percentage change between two values, and add or remove a percentage from a number. - URL: https://peasymath.com/math/percentage-calculator/ - Category: Math Tools - Processing: client - Steps: 1. Select a calculation mode (What is X% of Y, etc.) 2. Enter two numbers in the input fields 3. Click Calculate to see the result and formula ### Ratio Calculator Simplify, scale, and find equivalent ratios Work with ratios in three modes: simplify a ratio to its lowest terms, scale a ratio by a factor, or find equivalent ratios. Supports 2-part and 3-part ratios. - URL: https://peasymath.com/math/ratio-calculator/ - Category: Math Tools - Processing: client - Steps: 1. Enter a ratio (e.g., 12:8 or 3:4:5) 2. Select an action: simplify, scale, or find equivalents 3. For scaling, enter the scale factor 4. Click Calculate to see the result ### Average Calculator Calculate mean, median, mode, range, and standard deviation Enter a set of numbers to calculate comprehensive statistics: arithmetic mean, median, mode, range, sum, count, variance, and standard deviation. Handles decimal numbers and large data sets. - URL: https://peasymath.com/math/average-calculator/ - Category: Math Tools - Processing: client - Steps: 1. Enter numbers separated by commas, spaces, or newlines 2. Click Calculate to see all statistics 3. Review mean, median, mode, range, and standard deviation ### GCD & LCM Calculator Find greatest common divisor and least common multiple Calculate the GCD (greatest common divisor) and LCM (least common multiple) of two or more numbers. See step-by-step prime factorization and the relationship between GCD and LCM. - URL: https://peasymath.com/math/gcd-lcm-calculator/ - Category: Math Tools - Processing: client - Steps: 1. Enter two or more numbers separated by commas or spaces 2. Click Calculate to find GCD and LCM 3. Review the prime factorization of each number ### Prime Number Tools Check, factorize, generate, and find prime numbers Four prime number tools in one: check if a number is prime, find the prime factorization of any number, generate primes up to a limit, or find the Nth prime number. - URL: https://peasymath.com/math/prime-number-tools/ - Category: Math Tools - Processing: client - Steps: 1. Select an action: check, factorize, generate, or find Nth 2. Enter a number in the input area 3. Click Calculate to see the result ### Equation Solver Solve linear and quadratic equations step by step Solve linear equations (ax + b = 0) and quadratic equations (ax² + bx + c = 0) with step-by-step solutions. See the discriminant, roots, and vertex for quadratic equations. - URL: https://peasymath.com/math/equation-solver/ - Category: Math Tools - Processing: client - Steps: 1. Select equation type: linear (ax + b = 0) or quadratic (ax² + bx + c = 0) 2. Enter coefficients (e.g., 2 -3 for 2x - 3 = 0) 3. Click Solve to see the step-by-step solution ### Unit Converter Convert between length, weight, temperature, volume, and more Convert between units in 8 categories: length, weight, temperature, volume, area, speed, time, and digital storage. Enter a value with its unit and see all conversions at once. - URL: https://peasymath.com/math/unit-converter/ - Category: Math Tools - Processing: client - Steps: 1. Select a unit category (length, weight, temperature, etc.) 2. Enter a number with the unit name (e.g., '100 km') 3. Click Convert to see all equivalent values ### Fraction Calculator Add, subtract, multiply, divide, and simplify fractions A complete fraction calculator: simplify fractions to lowest terms, perform arithmetic (add, subtract, multiply, divide), convert between fractions and decimals. Supports mixed numbers like 1 3/4. - URL: https://peasymath.com/math/fraction-calculator/ - Category: Math Tools - Processing: client - Steps: 1. Enter a fraction or expression (e.g., '3/4 + 1/2') 2. Select an operation: simplify, add, subtract, multiply, or divide 3. Click Calculate to see the step-by-step solution ### Roman Numeral Converter Convert between Roman numerals and decimal numbers Convert decimal numbers to Roman numerals (1-3999) or Roman numerals back to decimal. Shows the breakdown of each numeral component. - URL: https://peasymath.com/math/roman-numeral-converter/ - Category: Math Tools - Processing: client - Steps: 1. Select conversion direction: to Roman or to Decimal 2. Enter a number (1-3999) or a Roman numeral string 3. Click Convert to see the result and breakdown ### Fibonacci Calculator Generate sequences, find nth terms, and check Fibonacci numbers Explore the Fibonacci sequence: generate the first N terms, find any specific term, check if a number belongs to the sequence, or sum a range. Shows the golden ratio approximation. - URL: https://peasymath.com/math/fibonacci-calculator/ - Category: Math Tools - Processing: client - Steps: 1. Select a mode: sequence, nth term, check, or sum 2. Enter a number (N for sequence/term, or a value to check) 3. Click Calculate to see the results and golden ratio ### Logarithm Calculator Calculate log₁₀, ln, log₂, and custom base logarithms Compute logarithms in any base with common identities, change-of-base formula, and antilog. Supports log₁₀, natural log (ln), log₂, and custom bases. - URL: https://peasymath.com/math/logarithm-calculator/ - Category: Math Tools - Processing: client - Steps: 1. 1 2. . 3. 4. E 5. n 6. t 7. e 8. r 9. 10. a 11. 12. n 13. u 14. m 15. b 16. e 17. r 18. 19. t 20. o 21. 22. c 23. a 24. l 25. c 26. u 27. l 28. a 29. t 30. e 31. 32. i 33. t 34. s 35. 36. l 37. o 38. g 39. a 40. r 41. i 42. t 43. h 44. m 45. 46. 2 47. . 48. 49. O 50. p 51. t 52. i 53. o 54. n 55. a 56. l 57. l 58. y 59. 60. s 61. p 62. e 63. c 64. i 65. f 66. y 67. 68. ' 69. n 70. u 71. m 72. b 73. e 74. r 75. 76. b 77. a 78. s 79. e 80. ' 81. 82. ( 83. e 84. . 85. g 86. . 87. , 88. 89. ' 90. 1 91. 0 92. 0 93. 94. 2 95. ' 96. 97. f 98. o 99. r 100. 101. l 102. o 103. g 104. ₂ 105. ( 106. 1 107. 0 108. 0 109. ) 110. ) 111. 112. 3 113. . 114. 115. R 116. e 117. v 118. i 119. e 120. w 121. 122. r 123. e 124. s 125. u 126. l 127. t 128. s 129. 130. a 131. c 132. r 133. o 134. s 135. s 136. 137. a 138. l 139. l 140. 141. c 142. o 143. m 144. m 145. o 146. n 147. 148. b 149. a 150. s 151. e 152. s 153. 154. 4 155. . 156. 157. S 158. e 159. e 160. 161. i 162. d 163. e 164. n 165. t 166. i 167. t 168. i 169. e 170. s 171. 172. a 173. n 174. d 175. 176. a 177. n 178. t 179. i 180. l 181. o 182. g 183. 184. v 185. a 186. l 187. u 188. e 189. s ### Statistics Calculator Mean, median, mode, standard deviation, and more Calculate comprehensive statistics from a dataset: mean, median, mode, range, variance, standard deviation, quartiles, IQR, and outlier detection. - URL: https://peasymath.com/math/statistics-calculator/ - Category: Math Tools - Processing: client - Steps: 1. 1 2. . 3. 4. E 5. n 6. t 7. e 8. r 9. 10. n 11. u 12. m 13. b 14. e 15. r 16. s 17. 18. s 19. e 20. p 21. a 22. r 23. a 24. t 25. e 26. d 27. 28. b 29. y 30. 31. c 32. o 33. m 34. m 35. a 36. s 37. 38. o 39. r 40. 41. s 42. p 43. a 44. c 45. e 46. s 47. 48. 2 49. . 50. 51. V 52. i 53. e 54. w 55. 56. c 57. e 58. n 59. t 60. r 61. a 62. l 63. 64. t 65. e 66. n 67. d 68. e 69. n 70. c 71. y 72. 73. m 74. e 75. a 76. s 77. u 78. r 79. e 80. s 81. 82. ( 83. m 84. e 85. a 86. n 87. , 88. 89. m 90. e 91. d 92. i 93. a 94. n 95. , 96. 97. m 98. o 99. d 100. e 101. ) 102. 103. 3 104. . 105. 106. R 107. e 108. v 109. i 110. e 111. w 112. 113. d 114. i 115. s 116. p 117. e 118. r 119. s 120. i 121. o 122. n 123. 124. m 125. e 126. t 127. r 128. i 129. c 130. s 131. 132. ( 133. v 134. a 135. r 136. i 137. a 138. n 139. c 140. e 141. , 142. 143. s 144. t 145. d 146. 147. d 148. e 149. v 150. , 151. 152. r 153. a 154. n 155. g 156. e 157. ) 158. 159. 4 160. . 161. 162. C 163. h 164. e 165. c 166. k 167. 168. q 169. u 170. a 171. r 172. t 173. i 174. l 175. e 176. s 177. , 178. 179. I 180. Q 181. R 182. , 183. 184. a 185. n 186. d 187. 188. o 189. u 190. t 191. l 192. i 193. e 194. r 195. 196. b 197. o 198. u 199. n 200. d 201. s ### Number Base Converter Convert between binary, octal, decimal, hex, and any base Convert numbers between any base from 2 to 36. Auto-detects 0b, 0o, 0x prefixes. Shows simultaneous binary, octal, decimal, and hexadecimal representations. - URL: https://peasymath.com/math/number-base-converter/ - Category: Math Tools - Processing: client - Steps: 1. 1 2. . 3. 4. E 5. n 6. t 7. e 8. r 9. 10. a 11. 12. n 13. u 14. m 15. b 16. e 17. r 18. 19. ( 20. u 21. s 22. e 23. 24. 0 25. b 26. , 27. 28. 0 29. o 30. , 31. 32. 0 33. x 34. 35. p 36. r 37. e 38. f 39. i 40. x 41. 42. f 43. o 44. r 45. 46. a 47. u 48. t 49. o 50. - 51. d 52. e 53. t 54. e 55. c 56. t 57. i 58. o 59. n 60. ) 61. 62. 2 63. . 64. 65. S 66. e 67. l 68. e 69. c 70. t 71. 72. s 73. o 74. u 75. r 76. c 77. e 78. 79. a 80. n 81. d 82. 83. t 84. a 85. r 86. g 87. e 88. t 89. 90. b 91. a 92. s 93. e 94. s 95. 96. 3 97. . 98. 99. V 100. i 101. e 102. w 103. 104. t 105. h 106. e 107. 108. n 109. u 110. m 111. b 112. e 113. r 114. 115. i 116. n 117. 118. a 119. l 120. l 121. 122. c 123. o 124. m 125. m 126. o 127. n 128. 129. b 130. a 131. s 132. e 133. s 134. 135. s 136. i 137. m 138. u 139. l 140. t 141. a 142. n 143. e 144. o 145. u 146. s 147. l 148. y 149. 150. 4 151. . 152. 153. C 154. o 155. p 156. y 157. 158. a 159. n 160. y 161. 162. r 163. e 164. p 165. r 166. e 167. s 168. e 169. n 170. t 171. a 172. t 173. i 174. o 175. n ### Matrix Calculator Perform matrix operations including addition, multiplication, transpose, determinant, and inverse. Supports 2×2, 3×3, and 4×4 matrices with step-by-step results. - URL: https://peasymath.com/math/matrix-calculator/ - Category: Math Tools - Processing: client ### Trigonometry Calculator Calculate trigonometric functions, convert between degrees and radians, solve right triangles, and explore the unit circle with visual references. - URL: https://peasymath.com/math/trigonometry-calculator/ - Category: Math Tools - Processing: client ## Guides (28) ### How to Generate Strong Random Passwords Password generation requires cryptographic randomness and careful character selection. This guide covers the principles behind strong password generation, entropy calculation, and common generation mistakes to avoid. - URL: https://peasymath.com/guides/generate-strong-random-passwords/ - Category: How-To - Reading time: 1 min - Words: 224 Key takeaways: - Password strength is measured in entropy — the number of bits of randomness. - Entropy = log2(character_set_size ^ password_length) - Never use `Math.random()` or similar pseudo-random functions for password generation. - Random word passphrases (like "correct horse battery staple") offer high entropy while being memorizable. - Using common substitutions (p@ssw0rd) — these are in every cracking dictionary. ## What Makes a Password Strong? Password strength is measured in entropy — the number of bits of randomness. Higher entropy means more possible combinations, making brute-force attacks impractical. ## Entropy Calculation Entropy = log2(character_set_size ^ password_length) | Character Set | Pool Size | 12-char Entropy | 16-char Entropy | |--------------|-----------|-----------------|----------------| | Lowercase only | 26 | 56 bits | 75 bits | | Mixed case | 52 | 68 bits | 91 bits | | Mixed + digits | 62 | 71 bits | 95 bits | | Mixed + digits + symbols | 95 | 79 bits | 105 bits | A password with 80+ bits of entropy is considered strong for most purposes. ## Cryptographic Randomness Never use `Math.random()` or similar pseudo-random functions for password generation. These are predictable. Use cryptographically secure random number generators (CSPRNG): - JavaScript: `crypto.getRandomValues()` - Python: `secrets` module - Node.js: `crypto.randomBytes()` ## Passphrase Alternative Random word passphrases (like "correct horse battery staple") offer high entropy while being memorizable. A 4-word passphrase from a 7776-word list (Diceware) provides 51 bits of entropy; 6 words provides 77 bits. ## Common Mistakes - Using common substitutions (p@ssw0rd) — these are in every cracking dictionary. - Truncating generated passwords to meet site limits (reduces entropy). - Generating passwords that don't meet the site's character requirements. - Using non-cryptographic random sources. ### Password Strength Analysis: How Strong Is Your Password Really? Learn the science behind password strength meters and entropy calculations. Understand what makes a password truly secure, how attackers crack weak passwords, and practical strategies for creating memorable yet unbreakable credentials. - URL: https://peasymath.com/guides/password-strength-analysis-guide/ - Category: How-To - Reading time: 1 min - Words: 287 Key takeaways: - Password strength is measured in bits of entropy — the mathematical randomness that determines how long a brute-force attack would take. - Attackers rarely rely on pure brute force. - The most effective approach combines length with randomness. - Most online strength meters check only basic criteria — length, character variety, and common patterns. - A four-word passphrase like `correct-horse-battery-staple` provides roughly 44 bits of entropy from a standard dictionary — adequate for low-value accounts but insufficient for critical ones. ## Understanding Password Entropy Password strength is measured in bits of entropy — the mathematical randomness that determines how long a brute-force attack would take. A password with 40 bits of entropy can be cracked in hours, while 80+ bits would take centuries with current hardware. Entropy depends on both the character set and the password length. | Character Set | Pool Size | Entropy/Char | | --- | --- | --- | | Lowercase only | 26 | 4.7 bits | | Mixed case | 52 | 5.7 bits | | Mixed + digits | 62 | 5.9 bits | | All printable ASCII | 95 | 6.6 bits | ## Common Attack Methods Attackers rarely rely on pure brute force. Dictionary attacks test common words and phrases first. Rule-based attacks apply transformations like appending numbers or substituting letters (e.g., `p@ssw0rd`). Rainbow table attacks use precomputed hashes for known passwords. Modern GPUs can test billions of hashes per second against weak algorithms like MD5. ## Building Strong Passwords The most effective approach combines length with randomness. A four-word passphrase like `correct-horse-battery-staple` provides roughly 44 bits of entropy from a standard dictionary — adequate for low-value accounts but insufficient for critical ones. Adding mixed case, symbols, and a fifth word pushes entropy above 80 bits. Password managers eliminate the need to memorize complex strings entirely. ## What Password Meters Miss Most online strength meters check only basic criteria — length, character variety, and common patterns. They cannot detect whether your password appears in leaked databases or matches personal information an attacker might know. Use the Peasy password strength analyzer for entropy-based scoring that goes beyond simple rule checks, and always verify your password against known breach databases. ### Advanced Markdown: Tables, Footnotes, Task Lists, and Extensions Go beyond basic Markdown with advanced features supported by major platforms. Covers GFM tables, footnotes, task lists, math notation, Mermaid diagrams, and the differences between Markdown flavors. - URL: https://peasymath.com/guides/advanced-markdown-tables-footnotes-extensions/ - Category: How-To - Reading time: 1 min - Words: 223 Key takeaways: - Basic Markdown covers headings, bold, italic, links, and images. - GFM (GitHub Flavored Markdown) tables use pipes and dashes. - Supported by GFM, Obsidian, and most static site generators: - Interactive checkboxes render on GitHub and GitLab: - GitHub, GitLab, Notion, and Obsidian render Mermaid diagrams directly in Markdown. ## Beyond Basic Markdown Basic Markdown covers headings, bold, italic, links, and images. But modern Markdown platforms support rich features that many users never discover. These extensions can replace dedicated diagramming tools, project trackers, and math editors for many common tasks. ## Tables GFM (GitHub Flavored Markdown) tables use pipes and dashes. Column alignment is controlled by colons in the separator row: left (`:---`), center (`:---:`), right (`---:`). Cells cannot span multiple rows or columns — for complex tables, use HTML within Markdown. ## Footnotes Supported by GFM, Obsidian, and most static site generators: ``` This claim needs citation[^1]. [^1]: Source: Nature, 2024, Vol 615. ``` ## Task Lists Interactive checkboxes render on GitHub and GitLab: ``` - [x] Completed item - [ ] Pending item - [ ] Another pending item ``` ## Mermaid Diagrams GitHub, GitLab, Notion, and Obsidian render Mermaid diagrams directly in Markdown. Create flowcharts, sequence diagrams, Gantt charts, and entity-relationship diagrams without external tools. ## Math Notation LaTeX math expressions render on GitHub, GitLab, and Jupyter. Inline math uses `$E = mc^2$`, display math uses `$$` delimiters. This enables technical documentation with proper mathematical notation. ## Flavor Differences CommonMark is the standardization effort, but GitHub, GitLab, Obsidian, and Pandoc each extend it differently. Always check your target platform's documentation. Format and preview Markdown with the Peasy Markdown editor. ### Percentage Calculation Formulas and Real-World Applications Percentages appear everywhere: discounts, tax rates, growth metrics, and exam scores. This guide covers the three core formulas and common calculation mistakes. - URL: https://peasymath.com/guides/percentage-calculation-formulas/ - Category: How-To - Reading time: 2 min - Words: 306 Key takeaways: - Every percentage problem reduces to one of three questions: - If an interest rate rises from 5% to 7%, it increased by 2 percentage points but by 40% in relative terms: `((7 - 5) / 5) * 100 = 40%`. - Finding the original value before a percentage was applied is a reverse calculation. - Sales tax**: Total = Price * (1 + Tax Rate) ## The Three Core Formulas Every percentage problem reduces to one of three questions: ### 1. What is X% of Y? Formula: `Result = Y * (X / 100)` Example: What is 15% of 200? `200 * (15 / 100) = 200 * 0.15 = 30` ### 2. X is what percent of Y? Formula: `Percentage = (X / Y) * 100` Example: 45 is what percent of 180? `(45 / 180) * 100 = 25%` ### 3. Percentage change from X to Y Formula: `Change = ((Y - X) / X) * 100` Example: Sales grew from 800 to 1,000. `((1000 - 800) / 800) * 100 = 25% increase` ## Percentage Points vs Percentages If an interest rate rises from 5% to 7%, it increased by 2 percentage points but by 40% in relative terms: `((7 - 5) / 5) * 100 = 40%`. This distinction matters in finance and journalism. ## Common Mistakes | Mistake | Why It's Wrong | |---------|---------------| | Adding percentages of different bases | 10% of 100 + 10% of 200 is not 10% of 300 | | Reversing percentage changes | A 50% increase then 50% decrease does NOT return to the original | | Confusing markup and margin | 50% markup on $10 = $15; 50% margin means cost is $5 | ## Reverse Percentage Finding the original value before a percentage was applied is a reverse calculation. If a discounted price is $85 after a 15% discount, the original price is `85 / (1 - 0.15) = 85 / 0.85 = $100`. ## Applications - **Sales tax**: Total = Price * (1 + Tax Rate) - **Tip calculation**: Tip = Subtotal * Tip Rate - **Grade calculation**: Score = (Points Earned / Total Points) * 100 - **Growth rate**: Compare … ### Password Strength and Generation: A Security Guide Weak passwords remain the leading cause of account breaches. This guide covers password entropy calculation, generation strategies, and storage best practices. - URL: https://peasymath.com/guides/password-strength-generation-guide/ - Category: Best Practice - Reading time: 1 min - Words: 274 Key takeaways: - Password strength is measured in bits of entropy — the number of possible combinations. - Four to six randomly selected words from a large dictionary. - Use a password manager (1Password, Bitwarden) - Use personal information (birthdays, names) - Use a cryptographically secure random number generator (CSPRNG), never `Math. ## What Makes a Password Strong Password strength is measured in bits of entropy — the number of possible combinations. Higher entropy means more guesses required to crack it. `Entropy = log2(characters ^ length)` | Password Type | Characters | Length | Entropy | |--------------|-----------|--------|--------| | 4-digit PIN | 10 | 4 | 13.3 bits | | Lowercase only | 26 | 8 | 37.6 bits | | Mixed case + numbers | 62 | 8 | 47.6 bits | | Full ASCII printable | 95 | 12 | 78.8 bits | | Passphrase (4 words) | ~7,776 | 4 words | ~51.7 bits | ## Generation Strategies ### Random Character Strings Maximum entropy per character. Use a cryptographically secure random number generator (CSPRNG), never `Math.random()` or Python's `random` module. Use `secrets` (Python) or `crypto.getRandomValues()` (JavaScript). ### Passphrase (Diceware) Four to six randomly selected words from a large dictionary. Easier to remember, similar entropy to a 10-12 character random string. Example: `correct-horse-battery-staple` (classic XKCD reference, 44 bits with 4 common words — use a 7,776-word list for better entropy). ### Pronounceable Passwords Alternating consonant-vowel patterns create memorable strings: `bapido-kumefa-niratu`. Lower entropy than pure random but more memorable. ## Storage Best Practices - Use a password manager (1Password, Bitwarden) - Generate unique passwords for every site - Minimum 16 characters for important accounts - Enable two-factor authentication (TOTP or hardware key) wherever available ## What NOT to Do - Reuse passwords across sites - Use personal information (birthdays, names) - Apply predictable substitutions (@ for a, 3 for e) — attackers know these patterns - Rely on complexity rules (uppercase + symbol) instead of length ### Compound Interest: The Math Behind Wealth Building Compound interest is the most powerful concept in personal finance. Understanding the formula and its variables helps you plan savings, evaluate loans, and compare investment options. - URL: https://peasymath.com/guides/compound-interest-calculation-guide/ - Category: How-To - Reading time: 1 min - Words: 257 Key takeaways: - P** = Principal (initial investment) - Invest $10,000 at 7% annual interest, compounded monthly, for 20 years: - More frequent compounding earns slightly more, but the difference diminishes rapidly beyond monthly. - A quick estimation: divide 72 by the annual interest rate to get the approximate years to double your money. - Compound interest works against you with debt. ## The Compound Interest Formula `A = P * (1 + r/n)^(n*t)` Where: - **A** = Final amount - **P** = Principal (initial investment) - **r** = Annual interest rate (decimal) - **n** = Compounding frequency per year - **t** = Time in years ## Example Calculation Invest $10,000 at 7% annual interest, compounded monthly, for 20 years: `A = 10000 * (1 + 0.07/12)^(12*20)` `A = 10000 * (1.00583)^240` `A = 10000 * 4.0387 = $40,387` Your money quadrupled without any additional contributions. ## Compounding Frequency | Frequency | n | $10K at 7% for 20yr | |-----------|---|--------------------| | Annually | 1 | $38,697 | | Quarterly | 4 | $40,064 | | Monthly | 12 | $40,387 | | Daily | 365 | $40,551 | | Continuous | ∞ | $40,552 | More frequent compounding earns slightly more, but the difference diminishes rapidly beyond monthly. ## The Rule of 72 A quick estimation: divide 72 by the annual interest rate to get the approximate years to double your money. At 8%, money doubles in about 72 / 8 = 9 years. ## Compound Interest in Debt Compound interest works against you with debt. Credit card interest at 20% APR compounded daily turns a $5,000 balance into $6,102 after one year of zero payments. This is why paying more than the minimum is critical. ## Practical Application When comparing savings accounts or loans, always check the APY (Annual Percentage Yield), which includes compounding effects. An account offering 4.9% APR compounded daily has an APY of 5.02%. ### BMI and Health Metric Calculations: A Practical Guide Body Mass Index and related health metrics provide quick screening tools. This guide covers the formulas, their limitations, and more informative alternatives. - URL: https://peasymath.com/guides/bmi-health-metric-calculations/ - Category: How-To - Reading time: 1 min - Words: 271 Key takeaways: - `BMI = weight (kg) / height (m)²` - BMI does not distinguish between muscle and fat. - `WHtR = waist circumference / height` - Use these calculations as screening tools, not diagnoses. - Healthy ranges: | Gender | Essential | Athletic | Fit | Acceptable | |--------|-----------|----------|-----|------------| | Men | 2-5% | 6-13% | 14-17% | 18-24% | | Women | 10-13% | 14-20% | 21-24% | 25-31% | ### Basal Metabolic Rate (BMR) Mifflin-St Jeor equation: - Men: `10 × weight(kg) + 6. ## BMI Formula ### Metric `BMI = weight (kg) / height (m)²` ### Imperial `BMI = weight (lbs) × 703 / height (inches)²` ## BMI Categories (WHO) | Category | BMI Range | |----------|----------| | Underweight | < 18.5 | | Normal | 18.5 - 24.9 | | Overweight | 25.0 - 29.9 | | Obese Class I | 30.0 - 34.9 | | Obese Class II | 35.0 - 39.9 | | Obese Class III | ≥ 40.0 | ## Limitations of BMI BMI does not distinguish between muscle and fat. A muscular athlete and a sedentary person can have identical BMIs with vastly different health profiles. BMI also ignores fat distribution — abdominal fat is more dangerous than hip fat. ## Better Alternatives ### Waist-to-Height Ratio `WHtR = waist circumference / height` A ratio above 0.5 indicates elevated health risk regardless of BMI. This metric correlates more strongly with cardiovascular disease. ### Body Fat Percentage Measured via DEXA scan, bioelectrical impedance, or skinfold calipers. Healthy ranges: | Gender | Essential | Athletic | Fit | Acceptable | |--------|-----------|----------|-----|------------| | Men | 2-5% | 6-13% | 14-17% | 18-24% | | Women | 10-13% | 14-20% | 21-24% | 25-31% | ### Basal Metabolic Rate (BMR) Mifflin-St Jeor equation: - Men: `10 × weight(kg) + 6.25 × height(cm) - 5 × age - 5` - Women: `10 × weight(kg) + 6.25 × height(cm) - 5 × age - 161` Multiply BMR by an activity factor (1.2-1.9) for Total Daily Energy Expenditure (TDEE). ## Practical Note Use these calculations as screening tools, not diagnoses. Consult healthcare professionals for personalized health assessments. ### Percentage Calculations: Common Formulas and Pitfalls Percentage calculations appear simple but hide common errors, especially around percentage change, percentage points, and compound percentages. This guide clarifies the math behind everyday percentage problems. - URL: https://peasymath.com/guides/percentage-calculations-guide/ - Category: How-To - Reading time: 1 min - Words: 248 Key takeaways: - Result = Number x (Percentage / 100) = 200 x 0.15 = 30 - If an interest rate goes from 5% to 7%, that's: - Discounts**: A 20% off then 10% off coupon gives 28% off, not 30%. ## Basic Percentage Formulas ### Finding a Percentage of a Number What is 15% of 200? Result = Number x (Percentage / 100) = 200 x 0.15 = 30 ### Finding What Percentage One Number Is of Another 30 is what percentage of 200? Percentage = (Part / Whole) x 100 = (30 / 200) x 100 = 15% ### Percentage Change From 200 to 250: Change = ((New - Old) / Old) x 100 = ((250 - 200) / 200) x 100 = +25% ## Common Pitfalls ### Percentage Points vs Percent Change If an interest rate goes from 5% to 7%, that's: - A 2 **percentage point** increase - A 40% **percent increase** (from 5 to 7) These are very different and often confused in news reports. ### Asymmetric Percentage Changes A 50% decrease followed by a 50% increase does NOT return to the original: - Start: 100 → 50% decrease → 50 → 50% increase → 75 This is because the percentage base changes after the first operation. ### Compounding Percentages Multiple sequential percentage changes cannot simply be added: - 10% increase then 20% increase is NOT a 30% increase. - Correct: 1.10 x 1.20 = 1.32, or a 32% total increase. ## Practical Applications - **Discounts**: A 20% off then 10% off coupon gives 28% off, not 30%. - **Tax**: Sales tax on a discounted item applies to the discounted price. - **Margins**: A 30% markup is not the same as a 30% margin. ### How to Generate Color Palettes Programmatically Algorithmic color palette generation creates harmonious color schemes from a single base color. Learn the math behind complementary, analogous, and triadic palettes and how to implement them in code. - URL: https://peasymath.com/guides/generate-color-palettes/ - Category: How-To - Reading time: 1 min - Words: 227 Key takeaways: - Programmatic palette generation uses color theory rules applied to a base color. - Rotate the hue by 180 degrees to find the complement: - From a base color, generate a full shade scale by adjusting lightness: - For more consistent perceived lightness across hues, use OKLCH instead of HSL. ## Color Palette Algorithms Programmatic palette generation uses color theory rules applied to a base color. The HSL (Hue, Saturation, Lightness) color space is most intuitive for algorithmic manipulation. ## HSL-Based Generation ### Complementary Rotate the hue by 180 degrees to find the complement: - Base: hsl(210, 80%, 50%) (blue) - Complement: hsl(30, 80%, 50%) (orange) ### Analogous Select colors 30 degrees apart on the color wheel: - Base: hsl(210, 80%, 50%) - Analogous 1: hsl(180, 80%, 50%) - Analogous 2: hsl(240, 80%, 50%) ### Triadic Three colors 120 degrees apart: - Base: hsl(210, 80%, 50%) - Triadic 1: hsl(330, 80%, 50%) - Triadic 2: hsl(90, 80%, 50%) ## Generating Shades and Tints From a base color, generate a full shade scale by adjusting lightness: | Step | Lightness | Usage | |------|-----------|-------| | 50 | 95% | Subtle backgrounds | | 100 | 90% | Light backgrounds | | 200 | 80% | Borders | | 300 | 70% | Hover states | | 500 | 50% | Primary (base) | | 700 | 30% | Dark variant | | 900 | 10% | Very dark | ## OKLCH: Perceptually Uniform Palettes For more consistent perceived lightness across hues, use OKLCH instead of HSL. HSL's lightness is not perceptually uniform — yellow at 50% lightness appears much brighter than blue at 50% lightness. OKLCH corrects this. ### Troubleshooting Floating-Point Precision Errors Floating-point arithmetic produces surprising results that can cause bugs in financial calculations, comparisons, and cumulative operations. This guide explains why these errors occur and how to handle them. - URL: https://peasymath.com/guides/troubleshooting-floating-point-precision/ - Category: Troubleshooting - Reading time: 1 min - Words: 227 Key takeaways: - In virtually every programming language: - IEEE 754 floating-point format stores numbers in binary. - Checking `if (a + b == c)` may fail even when mathematically correct. - Use decimal/arbitrary-precision types for financial calculations. - ### Currency Calculations Never use floating-point for money. ## The Classic Problem In virtually every programming language: 0.1 + 0.2 = 0.30000000000000004 This is not a bug — it's a fundamental limitation of how computers represent decimal fractions in binary. ## Why It Happens IEEE 754 floating-point format stores numbers in binary. Just as 1/3 has no finite decimal representation (0.333...), many decimal fractions have no finite binary representation. 0.1 in binary is 0.0001100110011... repeating. ## Common Symptoms ### Equality Comparisons Fail Checking `if (a + b == c)` may fail even when mathematically correct. Instead, compare with an epsilon tolerance: `if (Math.abs(a + b - c) < 1e-10)`. ### Accumulation Errors Adding small numbers to large numbers repeatedly can lose precision. Summing a million values of 0.01 may not yield exactly 10000.0. Use Kahan summation or sort-then-sum strategies for accurate accumulation. ### Currency Calculations Never use floating-point for money. $10.00 - $9.99 may not equal $0.01. Use integer cents, Decimal types, or dedicated money libraries. ## Solutions by Language | Language | Solution | |----------|----------| | Python | `decimal.Decimal('0.1')` | | JavaScript | `BigInt` (integers) or libraries like decimal.js | | Java | `BigDecimal` | | SQL | `NUMERIC(precision, scale)` | ## Best Practices - Use decimal/arbitrary-precision types for financial calculations. - Never compare floats for exact equality. - Round results for display, not during computation. - Document precision requirements in your API specifications. ### Statistics for A/B Testing: Confidence Intervals and Sample Sizes Proper statistical methodology is essential for valid A/B test results. This guide covers confidence intervals, sample size calculation, and common statistical mistakes that lead to false conclusions. - URL: https://peasymath.com/guides/statistics-ab-testing/ - Category: Best Practice - Reading time: 1 min - Words: 236 Key takeaways: - Without proper statistical rigor, A/B tests can lead to false conclusions. - The p-value is the probability of seeing results at least as extreme as the observed data, assuming there's no real difference. - Before starting a test, calculate the required sample size. ## Why Statistics Matter for A/B Tests Without proper statistical rigor, A/B tests can lead to false conclusions. A conversion rate increase might be random variation, not a real improvement. Statistical tests quantify the probability of being wrong. ## Key Concepts ### P-Value The p-value is the probability of seeing results at least as extreme as the observed data, assuming there's no real difference. A p-value below 0.05 is conventionally considered statistically significant. ### Confidence Interval A 95% confidence interval means that if you repeated the experiment many times, 95% of the intervals would contain the true value. Wider intervals indicate less certainty. ### Statistical Power Power is the probability of detecting a real effect when one exists. An underpowered test (typically below 80% power) may miss real improvements. ## Sample Size Calculation Before starting a test, calculate the required sample size. Key inputs: - **Baseline conversion rate**: Your current rate (e.g., 3%). - **Minimum detectable effect**: The smallest improvement worth detecting (e.g., 10% relative). - **Statistical significance**: Usually 95% (alpha = 0.05). - **Statistical power**: Usually 80% (beta = 0.20). ## Common Mistakes 1. **Peeking**: Checking results before reaching the required sample size inflates false positive rates. 2. **Multiple comparisons**: Testing many metrics simultaneously without correction. 3. **Stopping early**: Ending a test as soon as results look significant. 4. **Ignoring segments**: An overall neutral result may hide positive and negative effects in different user segments. ### How to Calculate Compound Interest and Loan Payments Understanding compound interest is essential for financial planning. Learn formulas for savings growth, loan amortization, and investment returns. - URL: https://peasymath.com/guides/how-to-calculate-compound-interest/ - Category: How-To - Reading time: 1 min - Words: 179 Key takeaways: - Simple interest is calculated only on the principal amount. - A = P(1 + r/n)^(nt) where P is principal, r is annual rate, n is compounding frequency, and t is years. - Loan payments use the annuity formula: M = P[r(1+r)^n] / [(1+r)^n - 1]. - To estimate how long it takes to double your money, divide 72 by the annual interest rate. ## Simple vs Compound Interest Simple interest is calculated only on the principal amount. Compound interest is calculated on the principal plus accumulated interest. Over time, compounding creates exponential growth — Einstein reportedly called it the eighth wonder. ## The Compound Interest Formula A = P(1 + r/n)^(nt) where P is principal, r is annual rate, n is compounding frequency, and t is years. Monthly compounding (n=12) produces more than annual compounding (n=1) for the same rate. ## Compounding Frequency Impact | Frequency | $10,000 at 5% for 10 years | |-----------|---------------------------| | Annual | $16,288.95 | | Monthly | $16,470.09 | | Daily | $16,486.65 | | Continuous | $16,487.21 | ## Loan Amortization Loan payments use the annuity formula: M = P[r(1+r)^n] / [(1+r)^n - 1]. Early payments are mostly interest; later payments are mostly principal. An amortization schedule shows this split for each payment. ## Rule of 72 To estimate how long it takes to double your money, divide 72 by the annual interest rate. At 6%, money doubles in approximately 12 years (72/6 = 12). ### Troubleshooting Percentage Calculation Errors Percentage calculations are deceptively simple but commonly done wrong. Learn to avoid the most frequent percentage calculation mistakes. - URL: https://peasymath.com/guides/troubleshooting-percentage-errors/ - Category: Troubleshooting - Reading time: 1 min - Words: 186 Key takeaways: - Saying 'the rate increased from 10% to 15%' is ambiguous. - A 10% increase followed by a 10% decrease does NOT return to the original value. - '20% of customers are premium, and 15% of those churn monthly.' What's the overall churn? - 'Sales increased 200%' — does this mean sales tripled (100% + 200% = 300% of original) or doubled (200% of original)? ## Percentage Increase vs Percentage Points ### The Mistake Saying 'the rate increased from 10% to 15%' is ambiguous. Is that a 5 percentage point increase or a 50% relative increase? Both interpretations are valid. ### The Fix Use 'percentage points' for absolute difference (5 pp) and 'percent' for relative change (50% increase). This distinction matters in finance, statistics, and reporting. ## Successive Percentages Don't Add ### The Mistake A 10% increase followed by a 10% decrease does NOT return to the original value. 100 → 110 (+10%) → 99 (-10%). The result is 1% less. ### The Rule Successive percentage changes multiply, not add. (1.10)(0.90) = 0.99, not 1.00. ## Percentage of a Percentage ### The Mistake '20% of customers are premium, and 15% of those churn monthly.' What's the overall churn? It's NOT 15% — it's 15% of 20% = 3% of total customers. ## Base Rate Confusion ### The Mistake 'Sales increased 200%' — does this mean sales tripled (100% + 200% = 300% of original) or doubled (200% of original)? Clarify whether '200% increase' means the growth amount or the final amount. ### How to Calculate and Improve Engagement Metrics Calculate engagement rate, reach, impressions, and other social metrics with formulas and improvement strategies. - URL: https://peasymath.com/guides/how-to-calculate-improve-engagement-metrics/ - Category: How-To - Reading time: 1 min - Words: 272 ## Social Media Engagement Calculations Accurate engagement measurement requires consistent formulas applied across platforms. Understanding what each metric means prevents misleading comparisons. ### Engagement Rate Formulas By reach: (total engagements / reach) × 100. By followers: (total engagements / followers) × 100. By impressions: (total engagements / impressions) × 100. The reach-based formula is most accurate but requires analytics access. The follower-based formula is easiest to calculate from public data. Impressions-based rates are always lower because impressions > reach. ### What Counts as Engagement Each platform defines engagement differently. Instagram: likes, comments, saves, shares. Twitter/X: likes, retweets, replies, clicks. LinkedIn: likes, comments, shares, clicks. TikTok: likes, comments, shares, saves. For cross-platform comparison, use a consistent definition — typically likes + comments + shares. ### Benchmarking Compare engagement rates within the same platform and industry vertical. A 3% rate on Instagram might be excellent for a B2B brand but below average for a personal lifestyle account. Track your own historical performance for the most meaningful comparison. Week-over-week and month-over-month trends matter more than absolute numbers. ### Improving Engagement Ask questions and create polls — posts requesting participation get 2-3× more comments. Use carousel/slider posts on Instagram (40% higher engagement than single images). Post when your audience is active (check analytics for peak hours). Reply to comments promptly — algorithmic feeds reward active conversations. Use relevant but not oversaturated hashtags. ### Avoiding Engagement Traps Don't optimize for engagement at the expense of business goals. Controversial posts generate engagement but may not attract your target audience. Giveaway-driven engagement drops immediately after the promotion ends. Focus on engagement from your target audience, not engagement from anyone. ### Financial Calculations: Compound Interest, Amortization, and NPV Financial math underlies investment decisions, loan comparisons, and business valuations. Master the core formulas and learn how to apply them in real scenarios. - URL: https://peasymath.com/guides/financial-calculations-compound-interest-npv/ - Category: How-To - Reading time: 2 min - Words: 336 ## Compound Interest Compound interest earns interest on both the principal and previously accumulated interest. The formula A = P(1 + r/n)^(nt) calculates the future value, where P is principal, r is annual rate, n is compounding frequency, and t is time in years. At 7% annual return, $10,000 becomes $19,672 in 10 years with annual compounding and $20,097 with monthly compounding. ### The Rule of 72 Divide 72 by the annual interest rate to estimate doubling time. At 8% interest, money doubles in approximately 9 years (72/8). This quick mental math helps evaluate investment opportunities and understand the cost of debt. ### Loan Amortization Monthly payment = P * [r(1+r)^n] / [(1+r)^n - 1], where P is the loan amount, r is the monthly interest rate, and n is the total number of payments. In the early years, most of each payment goes to interest; by the end of the term, most goes to principal. An amortization schedule shows this breakdown for each payment. ### Net Present Value (NPV) NPV calculates the present value of future cash flows minus the initial investment. A positive NPV means the investment creates value at the chosen discount rate. NPV = -Initial_Investment + Sum(Cash_Flow_t / (1+r)^t) for each period t. The discount rate typically reflects the cost of capital or the required rate of return. ### Internal Rate of Return (IRR) IRR is the discount rate that makes NPV equal to zero. It represents the annualized return of an investment. Compare IRR to your hurdle rate (minimum acceptable return): if IRR exceeds the hurdle rate, the investment is potentially worthwhile. Be cautious with IRR for projects with non-conventional cash flows (multiple sign changes), which can produce multiple IRR values. ### Practical Applications Mortgage comparison: Calculate total interest paid over the life of different … ### CSS Selector Specificity Deep Dive Master CSS specificity calculation, understand the cascade, and avoid specificity wars in large projects. - URL: https://peasymath.com/guides/css-selector-specificity-deep-dive/ - Category: Best Practice - Reading time: 1 min - Words: 274 Key takeaways: - Specificity determines which CSS rule wins when multiple rules target the same element. - Misunderstanding specificity leads to the dreaded !important chains and increasingly convoluted selectors. - ### !important: When It's Acceptable Use !important only for utility classes that must override any component styles (like `. - Never use !important to fix a specificity problem — fix the specificity instead. ## CSS Specificity Specificity determines which CSS rule wins when multiple rules target the same element. Misunderstanding specificity leads to the dreaded !important chains and increasingly convoluted selectors. ### The Specificity Algorithm Specificity is calculated as a tuple of three values: (IDs, Classes, Elements). `#nav .link a` has specificity (1,1,1). `.sidebar .nav-link:hover` has specificity (0,3,0). `div > p + p` has specificity (0,0,3). Higher values win, comparing left to right: (1,0,0) beats (0,99,99). ### What Doesn't Affect Specificity The universal selector (*), combinators (+, >, ~, space), and :where() have zero specificity. :where(.class) has specificity (0,0,0), while :is(.class) has the specificity of its most specific argument. This makes :where() powerful for resettable defaults. ### Specificity Wars Specificity escalation happens when developers override styles by adding more specific selectors, creating a cascade of increasing specificity. This quickly becomes unmaintainable. Solutions: use a methodology like BEM that keeps specificity flat (single class selectors), use CSS custom properties for values that need to vary, and use cascade layers (@layer) to control the override order independently of specificity. ### Cascade Layers CSS @layer provides a new mechanism for controlling cascade order that works independently of specificity. Styles in earlier layers are overridden by styles in later layers, regardless of specificity. This lets utility classes override component styles cleanly: `@layer base, components, utilities`. ### !important: When It's Acceptable Use !important only for utility classes that must override any component styles (like `.hidden { display: none !important }`), and for user-preference overrides like forced dark mode. Never use !important to fix a specificity problem — fix the specificity instead. In a well-organized codebase, !important should appear fewer than 10 times. ### File Size Calculation and Data Storage Units Convert between bytes, kilobytes, megabytes, and understand the difference between binary and decimal units. - URL: https://peasymath.com/guides/file-size-calculation-data-storage-units/ - Category: How-To - Reading time: 2 min - Words: 326 ## Data Storage Units The distinction between binary (KiB, MiB, GiB) and decimal (KB, MB, GB) units causes confusion in file sizes, storage capacity, and bandwidth calculations. ### Binary vs Decimal Units Binary: 1 KiB = 1,024 bytes (2^10). 1 MiB = 1,048,576 bytes (2^20). 1 GiB = 1,073,741,824 bytes (2^30). Decimal: 1 KB = 1,000 bytes (10^3). 1 MB = 1,000,000 bytes (10^6). 1 GB = 1,000,000,000 bytes (10^9). The difference grows with scale: 1 TB (decimal) is 931 GiB (binary). This is why your "1 TB" hard drive shows ~931 GB in your operating system. ### Who Uses Which Hard drive and SSD manufacturers use decimal units (makes their drives appear larger). Operating systems historically used binary units but labeled them with decimal prefixes. Network speeds use decimal: 100 Mbps = 100,000,000 bits per second. RAM uses binary: 8 GB of RAM = 8 GiB = 8,589,934,592 bytes. ### Bandwidth Calculations Network speeds are measured in bits, storage in bytes. 1 byte = 8 bits. A 100 Mbps connection transfers a maximum of 12.5 MB/s (100/8). In practice, overhead (protocol headers, retransmissions) reduces this by 5-10%. A 1 GB file takes approximately 85 seconds on a 100 Mbps connection: 1,000 MB / 11.75 MB/s effective. ### Image and Video File Size Estimation Uncompressed image size: width × height × bytes per pixel (3 for RGB, 4 for RGBA). A 4000×3000 RGB image = 36 MB uncompressed. JPEG compression typically achieves 10:1, so ~3.6 MB. Uncompressed video: width × height × 3 × fps × seconds. 1080p at 30fps for 60 seconds = 5.6 GB uncompressed. H.264 compression achieves roughly 50:1-200:1 depending on content. ### Practical Conversions Quick mental math: divide bytes by 1 million for MB (close enough for estimation). 15,728,640 bytes ≈ 15 MB. For precise conversion, … ### Mathematical Notation in Digital Documents Display math equations correctly in web pages, documents, and presentations using LaTeX and MathML. - URL: https://peasymath.com/guides/mathematical-notation-digital-documents/ - Category: How-To - Reading time: 1 min - Words: 258 Key takeaways: - Mathematical notation was designed for handwriting and print — translating it to digital formats presents unique challenges. - LaTeX (specifically its math mode) is the de facto standard for mathematical typesetting. - MathJax renders LaTeX notation in web browsers using HTML, CSS, and SVG — no browser plugins needed. - Microsoft Word uses an equation editor with a visual interface and LaTeX-like shortcuts. - Mathematical content must be accessible to screen readers. ## The Challenge of Digital Math Mathematical notation was designed for handwriting and print — translating it to digital formats presents unique challenges. Superscripts, subscripts, fractions, integrals, and matrices all require precise spatial layout that standard text rendering doesn't support. Several technologies address this. ## LaTeX: The Gold Standard LaTeX (specifically its math mode) is the de facto standard for mathematical typesetting. Used in academic papers, textbooks, and scientific journals worldwide. The syntax is text-based: \frac{a}{b} produces a fraction, \sum_{i=1}^{n} produces a summation. Learning LaTeX math syntax is essential for anyone regularly working with equations. ## Web Rendering Options MathJax renders LaTeX notation in web browsers using HTML, CSS, and SVG — no browser plugins needed. KaTeX (by Khan Academy) is faster but supports a smaller subset of LaTeX. MathML is the W3C standard built into browsers but has inconsistent support (excellent in Firefox and Safari, limited in Chrome). For web content, MathJax provides the best balance of compatibility and feature support. ## Document Formats Microsoft Word uses an equation editor with a visual interface and LaTeX-like shortcuts. Google Docs has a basic equation editor. For professional documents, write in LaTeX and compile to PDF. Markdown-based tools (Obsidian, Notion, Jupyter) support LaTeX math with dollar-sign delimiters ($inline$ and $$display$$). ## Accessibility Considerations Mathematical content must be accessible to screen readers. MathML provides the best accessibility since it carries semantic meaning. MathJax can output MathML for screen readers. Always provide alt text for equation images. Consider providing text descriptions for complex equations — not everyone can parse visual notation. ### Typography Scale: Choosing Type Sizes for UI Design Build a harmonious type scale using mathematical ratios for readable, consistent interfaces. - URL: https://peasymath.com/guides/typography-scale-choosing-type-sizes-ui/ - Category: How-To - Reading time: 1 min - Words: 281 Key takeaways: - Random font sizes create visual noise and inconsistency. - Minor Third (1.2): conservative, good for body-heavy content. - Start with your body text size (typically 16px for web, 14-17px for apps). - Type sizes should increase on larger screens. - Each type size needs an appropriate line height. ## Why Type Scales Matter Random font sizes create visual noise and inconsistency. A type scale uses a mathematical ratio to generate a harmonious set of sizes where each step feels proportionally related. This creates visual hierarchy, improves readability, and speeds up design decisions — instead of choosing from infinite sizes, you pick from a predefined set. ## Popular Scale Ratios Minor Third (1.2): conservative, good for body-heavy content. Major Third (1.25): balanced, popular for web apps. Perfect Fourth (1.333): moderate contrast, good for marketing pages. Augmented Fourth (1.414): strong contrast, suitable for editorial design. Golden Ratio (1.618): dramatic contrast, best for large displays and headings. ## Building Your Scale Start with your body text size (typically 16px for web, 14-17px for apps). Multiply up for headings: 16 × 1.25 = 20, 20 × 1.25 = 25, 25 × 1.25 = 31. Divide down for small text: 16 / 1.25 = 12.8 (round to 13). This gives you: 13, 16, 20, 25, 31, 39. Six to eight steps covers most interface needs. ## Responsive Scaling Type sizes should increase on larger screens. A common approach: use a smaller ratio on mobile (1.2) and larger ratio on desktop (1.333). The body size might be 16px on mobile and 18px on desktop. Implement with CSS clamp(): font-size: clamp(1rem, 0.5rem + 1vw, 1.125rem) for fluid scaling between breakpoints. ## Line Height and Spacing Each type size needs an appropriate line height. Smaller text needs more relative line height (1.6-1.8 for body copy) while larger headings need less (1.1-1.3). Spacing between text elements should follow the same scale. Heading-to-body spacing is typically 0.5-1× the heading size. Paragraph spacing is typically 0.5-1× the body line height. ### Secure Random Number Generation: When Math.random() Isn't Enough Math.random() is fine for shuffling a playlist but dangerous for passwords, tokens, and cryptographic applications. Learn when and how to use cryptographically secure random generators. - URL: https://peasymath.com/guides/secure-random-generation-guide/ - Category: Best Practice - Reading time: 1 min - Words: 241 ## The Problem with Math.random() JavaScript's Math.random() and similar standard library random functions use pseudorandom number generators (PRNGs). Given the seed, the entire sequence is predictable. This is fine for games, simulations, and UI effects, but disastrous for security-sensitive applications. ### When You Need CSPRNG Use a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG) for: password generation, session tokens, API keys, encryption keys, CSRF tokens, one-time passwords, and any value an attacker could benefit from predicting. ### Platform-Specific APIs In browsers, use `crypto.getRandomValues()` which draws from the operating system's entropy pool. In Node.js, use `crypto.randomBytes()` or `crypto.randomUUID()`. In Python, use `secrets.token_hex()`, `secrets.token_urlsafe()`, or `secrets.choice()`. Never implement your own random number generator for security purposes. ### Common Mistakes Using Math.random() for token generation — an attacker can predict subsequent tokens after observing enough output. Seeding a PRNG with a predictable value (timestamp, PID) — the attacker can reproduce the seed. Reducing entropy by truncating random output — a 128-bit random value truncated to 32 bits has only 32 bits of security. Using modulo to restrict range — `random % n` introduces bias when n doesn't divide evenly into the PRNG's output range. ### Entropy Sources Operating systems gather entropy from hardware events: disk I/O timing, network packet timing, mouse movements, keyboard input. /dev/urandom (Linux) and CryptGenRandom (Windows) maintain entropy pools that CSPRNG functions draw from. On headless servers with minimal I/O, consider hardware random number generators (Intel RDRAND, ARM RNDR) for additional entropy. ### Troubleshooting Floating-Point Precision Errors Understand why 0.1 + 0.2 ≠ 0.3 in computers and how to handle precision issues in calculations. - URL: https://peasymath.com/guides/troubleshooting-floating-point-precision-errors/ - Category: Troubleshooting - Reading time: 1 min - Words: 258 Key takeaways: - In virtually every programming language, 0.1 + 0.2 evaluates to 0.30000000000000004 instead of 0.3. - A 64-bit double-precision float uses 1 bit for sign, 11 bits for exponent, and 52 bits for mantissa (significand). - Floating-point errors are usually negligible for scientific calculations and graphics. - For financial calculations: use integer arithmetic in cents/pennies, or dedicated decimal types (Python Decimal, Java BigDecimal, PostgreSQL NUMERIC). - Python: `from decimal import Decimal` for exact decimal arithmetic. ## The Infamous 0.1 + 0.2 Problem In virtually every programming language, 0.1 + 0.2 evaluates to 0.30000000000000004 instead of 0.3. This isn't a bug — it's a fundamental consequence of representing decimal fractions in binary floating-point (IEEE 754). Just as 1/3 can't be exactly represented in decimal (0.333...), 1/10 can't be exactly represented in binary. ## How IEEE 754 Works A 64-bit double-precision float uses 1 bit for sign, 11 bits for exponent, and 52 bits for mantissa (significand). This gives approximately 15-17 significant decimal digits of precision. Numbers like 0.5 (1/2) and 0.25 (1/4) are exact because they're powers of 2. Numbers like 0.1 (1/10) require infinite binary digits, so they're rounded. ## When Precision Matters Floating-point errors are usually negligible for scientific calculations and graphics. They become critical in financial calculations (rounding errors accumulate across millions of transactions), comparison operations (checking if two floats are equal), and summing long series of numbers (errors accumulate). ## Solutions by Context For financial calculations: use integer arithmetic in cents/pennies, or dedicated decimal types (Python Decimal, Java BigDecimal, PostgreSQL NUMERIC). For comparisons: use epsilon-based comparison (abs(a-b) < 1e-10) instead of exact equality. For accumulation: use compensated summation (Kahan algorithm). For display: round to the appropriate number of decimal places before showing to users. ## Language-Specific Tools Python: `from decimal import Decimal` for exact decimal arithmetic. JavaScript: libraries like decimal.js or big.js (native BigDecimal proposal pending). Java: BigDecimal class. PostgreSQL: NUMERIC type with arbitrary precision. Always specify the precision you need and choose the right tool for that precision level. ### Fluid Typography with clamp(): A Modern CSS Approach Implement responsive typography that scales smoothly between viewport sizes using CSS clamp(). Covers the math behind fluid type scales, accessibility considerations, and practical implementation patterns. - URL: https://peasymath.com/guides/fluid-typography-clamp-modern-css/ - Category: How-To - Reading time: 1 min - Words: 269 Key takeaways: - Fixed font sizes require media query breakpoints for different screen sizes, creating jarring jumps between sizes. - font-size: clamp(minimum, preferred, maximum); - To calculate the preferred value for a given range: - Always use `rem` for minimum values to respect user font size preferences. ## The Problem with Fixed Font Sizes Fixed font sizes require media query breakpoints for different screen sizes, creating jarring jumps between sizes. Viewport units (`vw`) scale continuously but become too small on mobile and too large on desktop without constraints. The `clamp()` function solves both problems elegantly. ## How clamp() Works ```css font-size: clamp(minimum, preferred, maximum); font-size: clamp(1rem, 0.5rem + 1.5vw, 2rem); ``` The browser uses the preferred value (viewport-relative) but never goes below the minimum or above the maximum. The result is smooth scaling between two bounds — no breakpoints needed. ## The Formula To calculate the preferred value for a given range: ``` preferred = min-size + (max-size - min-size) * (100vw - min-viewport) / (max-viewport - min-viewport) ``` For 1rem at 320px → 2rem at 1200px: `preferred = 1rem + (2 - 1) * (100vw - 320px) / (1200 - 320)` = `1rem + 1 * (100vw - 320px) / 880` ≈ `0.636rem + 1.136vw` ## Type Scale | Level | Mobile (320px) | Desktop (1200px) | clamp() | | --- | --- | --- | --- | | Body | 1rem | 1.125rem | `clamp(1rem, 0.95rem + 0.14vw, 1.125rem)` | | H3 | 1.25rem | 1.5rem | `clamp(1.25rem, 1.11rem + 0.28vw, 1.5rem)` | | H2 | 1.5rem | 2rem | `clamp(1.5rem, 1.22rem + 0.57vw, 2rem)` | | H1 | 2rem | 3rem | `clamp(2rem, 1.43rem + 1.14vw, 3rem)` | ## Accessibility Always use `rem` for minimum values to respect user font size preferences. Ensure the minimum size meets WCAG SC 1.4.4 (resize up to 200%). Generate fluid type scales with the Peasy typography calculator. ### Secure Password Generation: Algorithms and Best Practices Explore the cryptographic random number generators behind secure password creation. Learn why Math.random() is never sufficient, how CSPRNG works, and the best practices for generating passwords in the browser. - URL: https://peasymath.com/guides/secure-password-generation-algorithms/ - Category: Best Practice - Reading time: 1 min - Words: 244 Key takeaways: - JavaScript's `Math.random()` uses a pseudorandom number generator (PRNG) that is fast but predictable. - The Web Crypto API provides `crypto.getRandomValues()`, which draws from the operating system's entropy pool. - Always use `crypto.getRandomValues()` or equivalent CSPRNG ## Why Math.random() Is Dangerous JavaScript's `Math.random()` uses a pseudorandom number generator (PRNG) that is fast but predictable. Its internal state can be recovered from a small number of observed outputs, allowing an attacker to predict future values. Never use `Math.random()` for security-sensitive operations like password or token generation. ## Cryptographically Secure Alternatives The Web Crypto API provides `crypto.getRandomValues()`, which draws from the operating system's entropy pool. On Linux this reads from `/dev/urandom`, on Windows from `BCryptGenRandom`, and on macOS from `SecRandomCopyBytes`. These sources collect entropy from hardware events — disk timing, mouse movements, and interrupt timing. ## Password Generation Strategies | Strategy | Entropy (typical) | Memorability | Example | | --- | --- | --- | --- | | Random characters (16) | ~105 bits | Very low | `kX9#mP2$vL7@nQ4&` | | Diceware (5 words) | ~64 bits | High | `table-crane-amber-frost-violin` | | Diceware (7 words) | ~90 bits | Medium | longer phrase | | Pronounceable (16) | ~60 bits | Medium | `boquimaletopusan` | ## Best Practices - Always use `crypto.getRandomValues()` or equivalent CSPRNG - Generate passwords of at least 16 characters or 5+ diceware words - Include characters from multiple Unicode categories when possible - Never truncate or modify generated passwords — it reduces entropy - Store generated passwords in a password manager immediately The Peasy password generator uses the Web Crypto API to create passwords entirely in your browser — no server communication, no logging, no storage. ### Financial Ratios and Business Calculations Explained Financial ratios distill complex business data into comparable metrics. This guide covers the key ratios investors and managers use to evaluate profitability, liquidity, and efficiency. - URL: https://peasymath.com/guides/financial-ratios-business-calculations/ - Category: Comparison - Reading time: 1 min - Words: 274 Key takeaways: - Formula: `(Revenue - COGS) / Revenue * 100` - Formula: `Current Assets / Current Liabilities` - Formula: `Share Price / Earnings Per Share` - No single ratio tells the complete story. - Always compare ratios against industry benchmarks and track trends over multiple periods rather than relying on a single snapshot. ## Profitability Ratios ### Gross Profit Margin Formula: `(Revenue - COGS) / Revenue * 100` Measures how much profit remains after direct production costs. A software company might have 80% gross margin; a grocery store, 25%. ### Net Profit Margin Formula: `Net Income / Revenue * 100` Accounts for all expenses including taxes and interest. This is the bottom-line profitability measure. ### Return on Equity (ROE) Formula: `Net Income / Shareholder Equity * 100` Shows how effectively the company uses investor capital. An ROE above 15% is generally considered strong. ## Liquidity Ratios ### Current Ratio Formula: `Current Assets / Current Liabilities` A ratio above 1.0 means the company can cover short-term obligations. Below 1.0 signals potential cash flow problems. ### Quick Ratio (Acid Test) Formula: `(Cash + Receivables + Short-term Investments) / Current Liabilities` Excludes inventory, which may be hard to liquidate quickly. A more conservative liquidity measure. ## Efficiency Ratios | Ratio | Formula | Meaning | |-------|---------|--------| | Inventory Turnover | COGS / Average Inventory | How fast inventory sells | | Receivables Turnover | Revenue / Average Receivables | How fast customers pay | | Asset Turnover | Revenue / Total Assets | Revenue per dollar of assets | ## Valuation Ratios ### Price-to-Earnings (P/E) Formula: `Share Price / Earnings Per Share` A P/E of 20 means investors pay $20 for every $1 of earnings. Compare within the same industry — tech companies typically trade at higher P/E ratios than utilities. ## Practical Tip No single ratio tells the complete story. Always compare ratios against industry benchmarks and track trends over multiple periods rather than relying on a single snapshot. ### Area and Volume Formulas: A Complete Quick Reference From calculating room paint coverage to sizing shipping containers, area and volume formulas are essential everyday math. This reference covers all standard 2D and 3D shapes. - URL: https://peasymath.com/guides/area-volume-formulas-reference/ - Category: Best Practice - Reading time: 2 min - Words: 352 ## 2D Area Formulas | Shape | Formula | Variables | |-------|---------|----------| | Square | a² | a = side length | | Rectangle | l × w | l = length, w = width | | Triangle | ½ × b × h | b = base, h = height | | Circle | π × r² | r = radius | | Trapezoid | ½ × (a + b) × h | a, b = parallel sides | | Ellipse | π × a × b | a, b = semi-axes | | Parallelogram | b × h | b = base, h = height | | Regular polygon | ½ × perimeter × apothem | apothem = center to mid-side | ## 3D Volume Formulas | Shape | Formula | Variables | |-------|---------|----------| | Cube | a³ | a = edge length | | Rectangular prism | l × w × h | l, w, h = dimensions | | Sphere | (4/3) × π × r³ | r = radius | | Cylinder | π × r² × h | r = radius, h = height | | Cone | (1/3) × π × r² × h | r = radius, h = height | | Pyramid | (1/3) × base area × h | h = height | | Hemisphere | (2/3) × π × r³ | r = radius | ## Surface Area Formulas | Shape | Formula | |-------|---------| | Sphere | 4 × π × r² | | Cylinder | 2πr(r + h) | | Cone | πr(r + slant height) | | Cube | 6 × a² | ## Practical Applications - **Paint coverage**: Measure wall area (L × H) minus window and door areas. One gallon covers approximately 350-400 square … ### Significant Figures and Rounding Rules for Accurate Results Significant figures communicate the precision of a measurement. Incorrect rounding can introduce errors that compound through calculations. This guide covers the rules and common mistakes. - URL: https://peasymath.com/guides/significant-figures-rounding-rules/ - Category: Best Practice - Reading time: 1 min - Words: 293 Key takeaways: - Significant figures (sig figs) are the meaningful digits in a number that contribute to its precision. - Use scientific notation to remove ambiguity: `1.500 × 10³` clearly has 4 sig figs. - If the digit after your last significant figure is 5 or greater, round up. - Round the result to the fewest decimal places in any operand. - Rounding intermediate results (round only the final answer to avoid compounding errors) ## What Are Significant Figures Significant figures (sig figs) are the meaningful digits in a number that contribute to its precision. They tell you how accurately a measurement was made. ## Counting Rules | Rule | Example | Sig Figs | |------|---------|----------| | Non-zero digits always count | 3.456 | 4 | | Zeros between non-zeros count | 1,005 | 4 | | Leading zeros do NOT count | 0.0042 | 2 | | Trailing zeros after decimal count | 2.300 | 4 | | Trailing zeros without decimal are ambiguous | 1,500 | 2, 3, or 4 | Use scientific notation to remove ambiguity: `1.500 × 10³` clearly has 4 sig figs. ## Rounding Rules ### Standard Rounding If the digit after your last significant figure is 5 or greater, round up. If less than 5, round down. Example: 3.456 rounded to 3 sig figs = 3.46. ### Banker's Rounding (Round Half to Even) When the digit is exactly 5 with no trailing digits, round to the nearest even number. This reduces systematic upward bias: - 2.35 → 2.4 (round up) - 2.45 → 2.4 (round down to even) ## Calculation Rules ### Addition / Subtraction Round the result to the fewest decimal places in any operand. `12.3 + 1.456 = 13.756 → 13.8` (1 decimal place) ### Multiplication / Division Round the result to the fewest significant figures in any operand. `4.56 × 1.4 = 6.384 → 6.4` (2 sig figs) ## Common Mistakes - Rounding intermediate results (round only the final answer to avoid compounding errors) - Reporting calculator outputs at full precision when input data has only 2-3 sig figs - Treating exact numbers (like counting 12 eggs) as having limited precision — exact values have infinite sig figs ### Time Zone Math and Date Calculations Explained Time zone conversions, daylight saving transitions, and date arithmetic are notoriously error-prone. This guide covers the rules and edge cases that trip up even experienced developers. - URL: https://peasymath.com/guides/time-zone-math-date-calculations/ - Category: Troubleshooting - Reading time: 2 min - Words: 307 Key takeaways: - Coordinated Universal Time (UTC) is the zero-offset reference point. - DST shifts clocks forward (spring) and backward (fall), changing the UTC offset temporarily. - Convert both dates to a day count (Julian Day Number or Unix timestamp) and subtract. - The international standard for date/time strings: - Assuming all days have 24 hours (DST days have 23 or 25) ## UTC as the Universal Reference Coordinated Universal Time (UTC) is the zero-offset reference point. All time zones are expressed as offsets from UTC: EST is UTC-5, JST is UTC+9. To convert between zones: subtract the source offset and add the target offset. Example: 3:00 PM EST (UTC-5) to JST (UTC+9): `15:00 + 5 (to UTC) + 9 (to JST) = 29:00 = 05:00 next day` ## Daylight Saving Time DST shifts clocks forward (spring) and backward (fall), changing the UTC offset temporarily. Not all regions observe DST, and transition dates vary by country: | Region | Spring Forward | Fall Back | |--------|---------------|----------| | US/Canada | 2nd Sunday March | 1st Sunday November | | EU | Last Sunday March | Last Sunday October | | Australia | 1st Sunday October | 1st Sunday April | During the spring transition, 2:00 AM jumps to 3:00 AM — the hour from 2:00 to 2:59 does not exist. In fall, 1:00-1:59 AM occurs twice. ## Date Arithmetic ### Days Between Dates Convert both dates to a day count (Julian Day Number or Unix timestamp) and subtract. Account for leap years: a year is leap if divisible by 4, except centuries unless divisible by 400. ### Adding Months Adding 1 month to January 31 creates an ambiguous result (February 31 does not exist). Libraries typically clamp to the last valid day of the target month (February 28/29). ## ISO 8601 Format The international standard for date/time strings: `2026-03-10T14:30:00+09:00` Always store datetimes in UTC and convert to local time zones for display. This prevents ambiguity and simplifies calculations. ## Common Mistakes - Assuming all days have 24 hours (DST days have 23 or 25) - Hardcoding UTC offsets instead of using timezone database names (America/New_York) - Calculating age by subtracting years without checking … ### Hash Function Mathematics: How Hashing Works Under the Hood Hash functions map arbitrary data to fixed-size outputs. Understanding the math behind hashing explains why collisions happen, why hashes are one-way, and how to choose the right algorithm. - URL: https://peasymath.com/guides/hash-function-mathematics-explained/ - Category: Comparison - Reading time: 2 min - Words: 342 Key takeaways: - A hash function takes an input of any length and produces a fixed-length output (the digest). - The probability of a hash collision grows much faster than intuition suggests. - Standard hash functions are too fast for password storage. - Data integrity**: Compare file hashes before and after transfer - The same input always produces the same output, but even a single bit change in the input completely changes the digest (avalanche effect). ## What a Hash Function Does A hash function takes an input of any length and produces a fixed-length output (the digest). The same input always produces the same output, but even a single bit change in the input completely changes the digest (avalanche effect). ## Key Properties | Property | Meaning | |----------|--------| | Deterministic | Same input → same output, always | | Uniform distribution | Outputs evenly spread across the range | | Avalanche effect | Small input change → ~50% of output bits flip | | Pre-image resistance | Cannot reverse from hash to input | | Collision resistance | Hard to find two inputs with the same hash | ## Common Algorithms | Algorithm | Output Size | Speed | Security | |-----------|------------|-------|----------| | MD5 | 128 bits | Very fast | Broken (collisions found) | | SHA-1 | 160 bits | Fast | Deprecated (collisions found) | | SHA-256 | 256 bits | Moderate | Strong | | SHA-3 | 256/512 bits | Moderate | Strong (different construction) | | BLAKE3 | 256 bits | Very fast | Strong | ## The Birthday Paradox The probability of a hash collision grows much faster than intuition suggests. For a hash with n possible outputs, a collision becomes 50% likely after approximately √n hashes. For 128-bit MD5, that is 2⁶⁴ — large but feasible for modern computers. For 256-bit SHA-256, it is 2¹²⁸ — computationally infeasible. ## Password Hashing Standard hash functions are too fast for password storage. An attacker can try billions of guesses per second. Password-specific functions (bcrypt, Argon2, scrypt) intentionally slow down hashing with configurable work factors: - **bcrypt**: CPU-bound, adjustable rounds (default 12) - **Argon2**: Memory-hard (requires configurable RAM, making GPU attacks expensive) - **scrypt**: Both memory-hard and CPU-hard ## Practical Applications … ## Glossary (48 terms) ### Bayes' Theorem (Bayes' Theorem) A formula for updating the probability of a hypothesis given new evidence, foundational to statistical inference. - URL: https://peasymath.com/glossary/bayes-theorem/ ### Big O Notation (Big O Notation) A mathematical notation describing the upper bound of an algorithm's time or space complexity as input size grows. - URL: https://peasymath.com/glossary/big-o-notation/ ### Binomial Distribution (Binomial Probability Distribution) A discrete probability distribution modeling the number of successes in a fixed number of independent yes/no trials. - URL: https://peasymath.com/glossary/binomial-distribution/ ### Boolean Algebra (Boolean Algebra) A branch of algebra operating on true/false values using AND, OR, NOT operators, foundational to digital logic. - URL: https://peasymath.com/glossary/boolean-algebra/ ### Combination (Combination) A selection of elements without regard to order — n choose r equals n!/[r!(n-r)!]. - URL: https://peasymath.com/glossary/combination/ ### Complex Number (Complex Number) A number of the form a + bi where i is the imaginary unit (square root of -1), used in signal processing and physics. - URL: https://peasymath.com/glossary/complex-number/ ### Correlation (Statistical Correlation) A measure of the linear relationship between two variables, ranging from -1 (inverse) to +1 (direct). - URL: https://peasymath.com/glossary/correlation/ ### Cross Product (Vector Cross Product) An operation on two 3D vectors producing a vector perpendicular to both, with magnitude equal to the parallelogram area they span. - URL: https://peasymath.com/glossary/cross-product/ ### Derivative (Calculus Derivative) The instantaneous rate of change of a function with respect to its variable, representing the slope of the tangent line. - URL: https://peasymath.com/glossary/derivative/ ### Determinant (Matrix Determinant) A scalar value computed from a square matrix that indicates whether the matrix is invertible and describes scaling. - URL: https://peasymath.com/glossary/determinant/ ### Dot Product (Vector Dot Product) An operation on two vectors returning a scalar equal to the sum of element-wise products, measuring alignment. - URL: https://peasymath.com/glossary/dot-product/ ### Eigenvalue (Eigenvalue) A scalar that, when a matrix is applied to its eigenvector, scales the vector without changing its direction. - URL: https://peasymath.com/glossary/eigenvalue/ ### Entropy (Information) (Shannon Information Entropy) A measure of uncertainty or information content in a dataset, calculated as the negative sum of probabilities times their logarithms. - URL: https://peasymath.com/glossary/entropy-information/ ### Euler's Number (Euler's Number (e)) The mathematical constant e (approximately 2.71828), the base of natural logarithms, central to calculus and compound growth. - URL: https://peasymath.com/glossary/eulers-number/ ### Exponential (Exponential Function) A function where the variable appears as an exponent (e.g. e^x), modeling rapid growth or decay processes. - URL: https://peasymath.com/glossary/exponential/ ### Factorial (Factorial (n!)) The product of all positive integers up to n (e.g. 5! = 120), used in combinatorics and probability. - URL: https://peasymath.com/glossary/factorial/ ### Fibonacci Sequence (Fibonacci Sequence) A sequence where each number is the sum of the two preceding ones (0, 1, 1, 2, 3, 5, 8, 13, ...). - URL: https://peasymath.com/glossary/fibonacci-sequence/ ### Fourier Transform (Fourier Transform) A mathematical operation decomposing a signal into its constituent frequencies, fundamental to audio and image processing. - URL: https://peasymath.com/glossary/fourier-transform/ ### GCD (Greatest Common Divisor) The largest positive integer that divides two or more numbers without leaving a remainder. - URL: https://peasymath.com/glossary/gcd/ ### Gradient (Mathematical Gradient) A vector of partial derivatives indicating the direction and rate of steepest ascent of a multivariable function. - URL: https://peasymath.com/glossary/gradient/ ### Hamming Distance (Hamming Distance) The number of positions at which corresponding bits or symbols of two equal-length strings differ, used in error detection and coding theory. - URL: https://peasymath.com/glossary/hamming-distance/ ### Integral (Calculus Integral) The accumulation of a quantity over an interval, geometrically representing the area under a curve. - URL: https://peasymath.com/glossary/integral/ ### Interpolation (Math) (Mathematical Interpolation) Estimating unknown values between known data points using methods like linear, polynomial, or spline interpolation. - URL: https://peasymath.com/glossary/interpolation-math/ ### LCM (Least Common Multiple) The smallest positive integer that is divisible by two or more given numbers. - URL: https://peasymath.com/glossary/lcm/ ### Least Squares (Least Squares Method) A curve-fitting method that minimizes the sum of squared differences between observed data points and a model's predictions. - URL: https://peasymath.com/glossary/least-squares/ ### Logarithm (Logarithm) The inverse of exponentiation — log base b of x equals the power to which b must be raised to yield x. - URL: https://peasymath.com/glossary/logarithm/ ### Matrix (Mathematical Matrix) A rectangular array of numbers arranged in rows and columns, used in linear algebra and transformations. - URL: https://peasymath.com/glossary/matrix/ ### Mean (Arithmetic Mean) The average of a set of numbers, calculated by dividing the sum of all values by the count of values. - URL: https://peasymath.com/glossary/mean/ ### Median (Statistical Median) The middle value in a sorted dataset, separating the higher half from the lower half. - URL: https://peasymath.com/glossary/median/ ### Mode (Statistical Mode) The most frequently occurring value in a dataset, useful for categorical data where mean is meaningless. - URL: https://peasymath.com/glossary/mode/ ### Modular Arithmetic (Modular Arithmetic) A system of arithmetic where numbers wrap around after reaching a modulus (e.g. 17 mod 5 = 2). - URL: https://peasymath.com/glossary/modular-arithmetic/ ### Monte Carlo Method (Monte Carlo Simulation) A computational technique that uses repeated random sampling to estimate numerical results for problems that are difficult to solve analytically. - URL: https://peasymath.com/glossary/monte-carlo-method/ ### Newton's Method (Newton-Raphson Method) An iterative algorithm for finding roots of equations by successively improving an estimate using the function's derivative. - URL: https://peasymath.com/glossary/newtons-method/ ### Normal Distribution (Normal (Gaussian) Distribution) A symmetric bell-shaped probability distribution where about 68% of values fall within one standard deviation of the mean. - URL: https://peasymath.com/glossary/normal-distribution/ ### Percentile (Statistical Percentile) A value below which a given percentage of observations fall (e.g. 95th percentile means 95% of values are lower). - URL: https://peasymath.com/glossary/percentile/ ### Permutation (Permutation) An ordered arrangement of elements — the number of permutations of n items taken r at a time is n!/(n-r)!. - URL: https://peasymath.com/glossary/permutation/ ### Pi (Pi (Circumference Ratio)) The mathematical constant representing the ratio of a circle's circumference to its diameter, approximately 3.14159. - URL: https://peasymath.com/glossary/pi/ ### Prime Number (Prime Number) A natural number greater than 1 divisible only by 1 and itself (e.g. 2, 3, 5, 7, 11, 13). - URL: https://peasymath.com/glossary/prime-number/ ### Probability Distribution (Probability Distribution) A mathematical function describing the likelihood of different outcomes in a random experiment (e.g. normal, Poisson). - URL: https://peasymath.com/glossary/probability-distribution/ ### Pythagorean Theorem (Pythagorean Theorem) The relation a^2 + b^2 = c^2 in a right triangle, where c is the hypotenuse. - URL: https://peasymath.com/glossary/pythagorean-theorem/ ### Radians (Radian Measure) An angle measurement where one radian equals the angle subtended by an arc equal in length to the radius. - URL: https://peasymath.com/glossary/radians/ ### Regression (Regression Analysis) A statistical method for modeling the relationship between a dependent variable and one or more independent variables. - URL: https://peasymath.com/glossary/regression/ ### Set Theory (Set Theory) A branch of mathematics studying collections of objects, with operations like union, intersection, and complement. - URL: https://peasymath.com/glossary/set-theory/ ### Sigmoid Function (Sigmoid Function) An S-shaped function mapping any real number to a value between 0 and 1, widely used in logistic regression and neural networks. - URL: https://peasymath.com/glossary/sigmoid-function/ ### Standard Deviation (Standard Deviation) A measure of how spread out values are from the mean — low values indicate data clustered near the average. - URL: https://peasymath.com/glossary/standard-deviation/ ### Taylor Series (Taylor Series Expansion) An infinite sum of polynomial terms that approximates a function around a point, used in calculators and numerical methods. - URL: https://peasymath.com/glossary/taylor-series/ ### Variance (Statistical Variance) The average of squared deviations from the mean, measuring how far data points spread from the average. - URL: https://peasymath.com/glossary/variance/ ### Z-Score (Standard Score (Z-Score)) The number of standard deviations a data point lies from the mean, used to compare values across different distributions. - URL: https://peasymath.com/glossary/z-score/ ## API Base URL: https://peasymath.com/api/v1/ | Endpoint | Description | |----------|-------------| | GET /api/v1/tools/ | List all tools (filterable by category) | | GET /api/v1/tools/{slug}/ | Tool detail with description, steps, FAQ | | GET /api/v1/categories/ | Tool categories | | GET /api/v1/formats/ | File formats reference | | GET /api/v1/formats/{slug}/ | Format detail with history, pros/cons | | GET /api/v1/conversions/ | Format conversion guides | | GET /api/v1/glossary/ | Terminology with definitions | | GET /api/v1/glossary/{slug}/ | Term with simple + technical explanations, code examples, references | | GET /api/v1/guides/ | Educational guides (filterable by category, audience_level) | | GET /api/v1/guides/{slug}/ | Full guide with content, takeaways, ToC, related guides | | GET /api/v1/use-cases/ | Real-world use cases by industry | | GET /api/v1/search/?q={query} | Cross-model search | | GET /api/v1/sites/ | All 16 Peasy sites | OpenAPI spec: https://peasymath.com/api/openapi.json ## Content Negotiation All pages support Markdown output for AI agents: - Add `?format=md` to any page URL - Or send `Accept: text/markdown` header ## Platform Stats - 251 tools across 16 sites - 131 file formats documented - 1484 format conversion guides - 695 glossary terms (with simple + technical explanations) - 645 educational guides (avg 1,308 words) - 302 real-world use cases