{
  "base64-codec": {
    "title": "Base64 Encoder and Decoder — How It Works, With a Worked Example",
    "description": "Encode and decode Base64 in your browser, and understand the 3-byte to 4-character algorithm, the padding rule, the 33% size overhead and why btoa fails on emoji.",
    "keywords": "base64 encoder, base64 decoder, how base64 works, base64 padding equals sign, base64url, data uri, btoa unicode error",
    "article": "<h1>What Base64 actually does</h1><p>Base64 rewrites arbitrary bytes using only 64 characters that survive any text channel. The alphabet is fixed:</p><table><tr><th>Index</th><th>Characters</th></tr><tr><td>0–25</td><td>A–Z</td></tr><tr><td>26–51</td><td>a–z</td></tr><tr><td>52–61</td><td>0–9</td></tr><tr><td>62</td><td>+</td></tr><tr><td>63</td><td>/</td></tr></table><p>The mechanism is a regrouping of bits. Three bytes are 24 bits; 24 divides evenly into four 6-bit groups; each 6-bit group is a number from 0 to 63, which indexes the table above. Nothing is compressed, encrypted or hashed — the bits are identical, only the grouping changed.</p><h2>A worked example</h2><p>Encode the three characters <code>Man</code>:</p><table><tr><th>Step</th><th>Value</th></tr><tr><td>ASCII codes</td><td>M = 77, a = 97, n = 110</td></tr><tr><td>As bytes</td><td>01001101 01100001 01101110</td></tr><tr><td>Regrouped into 6 bits</td><td>010011 010110 000101 101110</td></tr><tr><td>As numbers</td><td>19, 22, 5, 46</td></tr><tr><td>Alphabet lookup</td><td>T, W, F, u</td></tr></table><p>So <code>Man</code> becomes <strong>TWFu</strong>. Four characters out for three bytes in, every time.</p><h2>Where the equals signs come from</h2><p>When the input is not a multiple of three bytes, the final group is incomplete. It is zero-padded up to six bits, and then <code>=</code> characters are appended so the output length stays a multiple of four:</p><table><tr><th>Input</th><th>Bytes</th><th>Output</th><th>Padding</th></tr><tr><td>Man</td><td>3</td><td>TWFu</td><td>none</td></tr><tr><td>Ma</td><td>2</td><td>TWE=</td><td>one</td></tr><tr><td>M</td><td>1</td><td>TQ==</td><td>two</td></tr></table><p>So the number of equals signs tells you the remainder: one means the input length left 2 over, two means it left 1 over, and you will never see three. Padding is only a length marker — some decoders accept its absence.</p><h2>The 33% overhead</h2><p>Output length is <code>ceil(bytes ÷ 3) × 4</code>, which is roughly a third larger than the input:</p><table><tr><th>Original</th><th>Base64</th><th>Increase</th></tr><tr><td>1 KB</td><td>1.37 KB</td><td>+37%</td></tr><tr><td>100 KB</td><td>136.7 KB</td><td>+37%</td></tr><tr><td>1 MB</td><td>1.37 MB</td><td>+37%</td></tr></table><p>The theoretical floor is 33.3%; real figures land nearer 37% once line breaks are counted, since the MIME specification wraps encoded output at 76 characters per line. This is the practical argument against inlining large images as data URIs — you pay a third more bytes, and unlike a separate file the result cannot be cached independently or loaded lazily.</p><h2>The Unicode trap</h2><p>This is the error most developers hit. The browser function <code>btoa</code> operates on bytes, and it treats each character of its input as one byte. Any character above code point 255 — an emoji, an accented letter in some cases, anything in Arabic, Devanagari or Han — makes it throw an <em>InvalidCharacterError</em>.</p><p>The cause is a category error rather than a bug: Base64 encodes <em>bytes</em>, and a string is not bytes until you choose an encoding. The fix is to convert the text to UTF-8 first, usually with <code>TextEncoder</code>, then Base64 the resulting byte array. Decoding runs the reverse: Base64 to bytes, then <code>TextDecoder</code> back to text. Skipping that step produces silent corruption of every non-ASCII character.</p><h2>Where it is used, and the URL-safe variant</h2><p>Base64 appears in email attachments through MIME, in HTTP Basic authentication headers, in data URIs inside CSS and HTML, in PEM-wrapped certificates and keys, and in binary fields inside JSON, which has no byte type of its own.</p><p>Because <code>+</code> and <code>/</code> have meaning in URLs and filenames, a second alphabet exists — <strong>base64url</strong>, defined in RFC 4648, which substitutes <code>-</code> and <code>_</code> and usually drops the padding. JSON Web Tokens use this variant, which is why a JWT contains dashes and underscores and no equals signs. Feeding base64url into a standard decoder that does not translate those two characters yields garbage or an error.</p><h2>Honest limits</h2><p>The single most important point: <strong>Base64 is not encryption and provides no security whatsoever.</strong> It is a reversible public transformation with no key. Anything Base64-encoded is readable by anyone in one step, so it must never be used to protect a password, token or personal data. Encoded credentials in a Basic auth header are protected by the transport layer, not by Base64.</p><p>It is also not a checksum — it will not detect corruption — and it is not compression, since it makes data larger. Very large inputs can exhaust browser memory, because the whole string plus its decoded form must be held at once.</p><h2>Questions people actually ask</h2><h3>Why does my decoded output look like garbage?</h3><p>Usually one of three causes: the input was base64url and the decoder expected the standard alphabet, the padding was stripped by a system that trimmed the string, or the original was binary rather than text and there is nothing readable to show.</p><h3>Can I decode a string without the padding?</h3><p>Generally yes. The correct length is inferable from the character count, and most decoders reconstruct it. Some strict implementations refuse, which is why padding still exists.</p><h3>Why is Base64 used for images in CSS?</h3><p>To remove an HTTP request, which mattered a great deal before HTTP/2 multiplexing. For small icons it can still help; for anything sizeable the 37% overhead and the loss of separate caching outweigh the saved request.</p><h3>Is my input stored?</h3><p>No. Encoding and decoding happen in your browser and nothing you paste is transmitted or logged.</p>"
  },
  "age-calculator": {
    "title": "Age Calculator — Exact Years, Months and Days, and Why Tools Disagree",
    "description": "Work out your age in years, months, days and total days from a date of birth, with the borrow algorithm shown, plus the month-end and leap-year edge cases that make calculators differ.",
    "keywords": "age calculator, exact age in days, age from date of birth, leap year birthday, how many days have i lived, month end date arithmetic",
    "article": "<h1>How age arithmetic actually works</h1><p>Calendar age is not a subtraction of two numbers, because months have unequal lengths. The standard method is a borrow algorithm, the same idea as long subtraction:</p><p><code>days = D2 − D1 ; months = M2 − M1 ; years = Y2 − Y1</code><br>If <code>days</code> is negative, add the number of days in the month before the target date and reduce <code>months</code> by one. If <code>months</code> is then negative, add 12 and reduce <code>years</code> by one.</p><p>That ordering matters. Borrowing days first, then months, gives the answer people expect; doing it in the other order produces off-by-one results near month boundaries.</p><h2>A worked example</h2><p>Date of birth 15 March 1990, measured on 28 August 2026:</p><table><tr><th>Component</th><th>Calculation</th><th>Result</th></tr><tr><td>Days</td><td>28 − 15</td><td>13</td></tr><tr><td>Months</td><td>8 − 3</td><td>5</td></tr><tr><td>Years</td><td>2026 − 1990</td><td>36</td></tr></table><p>No borrowing was needed, so the age is <strong>36 years, 5 months and 13 days</strong>. The total-days figure is computed separately, because it cannot be derived from that triple:</p><table><tr><th>Segment</th><th>Days</th></tr><tr><td>15 Mar 1990 to 15 Mar 2026 — 36 × 365</td><td>13,140</td></tr><tr><td>Leap days in that span (1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024)</td><td>9</td></tr><tr><td>15 Mar 2026 to 28 Aug 2026</td><td>166</td></tr><tr><td><strong>Total lived</strong></td><td><strong>13,315</strong></td></tr></table><h2>Milestones that fall between birthdays</h2><p>Because the total-days count runs independently of the calendar, several round numbers arrive on ordinary weekdays:</p><table><tr><th>Milestone</th><th>Approximate age</th></tr><tr><td>1,000 days</td><td>2 years 8 months</td></tr><tr><td>10,000 days</td><td>27 years 4 months</td></tr><tr><td>1 billion seconds</td><td>31 years 8 months</td></tr><tr><td>20,000 days</td><td>54 years 9 months</td></tr><tr><td>30,000 days</td><td>82 years 1 month</td></tr></table><h2>The leap-year rule in full</h2><p>A year is a leap year if it is divisible by 4, <em>except</em> century years, which must also be divisible by 400. So 1900 was not a leap year and 2000 was. This is why any calculator that simply divides by 365.25 drifts: the true mean Gregorian year is <code>365.2425</code> days, and the 400-year cycle contains 97 leap days, not 100.</p><h2>Why two calculators can give different answers</h2><p>This is not sloppiness — the question is genuinely underdetermined at month ends. Take 31 January plus one month. Is the result 28 February, because February has no 31st and the day clamps to the last valid one? Or 3 March, because 31 days were added? Reputable date libraries disagree, and both behaviours are documented as correct within their own conventions.</p><p>The same ambiguity runs backwards. From 31 January to 1 March, is the elapsed time one month and one day, or 29 days? Counting whole months first gives the former; counting days gives the latter. A tool is only wrong if it is inconsistent with itself.</p><p>Two more sources of disagreement: whether the end date counts as a full day, and time zones. If your birth date is stored as midnight UTC and read in a zone behind UTC, the displayed date can shift by one day, which changes the answer by a day near midnight.</p><h2>Where the calendar itself gets in the way</h2><p>Dates before the Gregorian reform are ambiguous rather than merely old. Catholic Europe switched in October 1582; Britain and its colonies switched in September 1752, skipping eleven days so that 2 September was followed by 14 September; Russia switched in 1918 and Greece in 1923. A date recorded in a parish register from 1700 may be Julian, and no calculator can tell which without knowing the place. For genealogy, treat anything before the local switch as approximate.</p><p>There are also cultural systems that do not match this arithmetic at all. Korea historically counted a newborn as one year old and added a year at New Year rather than on the birthday, so a person could be two at a few days old. That reckoning was formally set aside in favour of international age in June 2023, but you will still meet both numbers in older documents.</p><h2>Honest limits</h2><p>Chronological age is a count of days, nothing more. It is not <em>biological</em> age, and it does not predict health, fitness or life expectancy for any individual — those depend on factors this tool has no access to. Any medical or fitness formula that takes age as an input, including target heart-rate ranges and BMI-for-age percentiles, is a population approximation and no substitute for a clinician.</p><p>Note too that some legal and financial contexts do not use the age you would calculate here. Several insurers price on <em>age nearest birthday</em>, which rounds up for anyone past the halfway point, so your quoted age can be one higher than your real one. Tax and pension thresholds sometimes use age at the end of a tax year instead.</p><h2>Questions people actually ask</h2><h3>What happens if I was born on 29 February?</h3><p>Mathematically your age increments on 1 March in non-leap years, because 29 February does not exist to be reached. Legally it varies by jurisdiction — some define the birthday as 28 February and some as 1 March, which occasionally matters for a document that must be signed at exactly 18.</p><h3>Why does the day count not equal years times 365?</h3><p>Leap days. Over 36 years there are typically nine of them, so the total is nine days higher than the naive product. Over a century the gap is about 24 days.</p><h3>Can I find the weekday I was born on?</h3><p>Yes, and it is deterministic — the Gregorian calendar repeats on a 400-year cycle, so the weekday for any date follows from the date alone. It has no bearing on anything beyond curiosity.</p><h3>Is my date of birth stored anywhere?</h3><p>No. The calculation runs in your browser and the date you enter is never transmitted or saved.</p>"
  },
  "password-generator": {
    "title": "Password Generator — Entropy in Bits, and What NIST Now Recommends",
    "description": "Generate random passwords in your browser, with the entropy formula, a cracking-time table, why a 16-character password beats a complex 8-character one, and why forced complexity rules were dropped.",
    "keywords": "password generator, password entropy bits, how long should a password be, diceware passphrase, crypto getRandomValues, nist password guidelines",
    "article": "<h1>Strength has a formula</h1><p>Password strength is measured in bits of entropy, and for a randomly generated password it is exact:</p><p><code>bits = length × log2(alphabet size)</code></p><p>Each bit doubles the search space. Adding one character to a 95-symbol password adds about 6.6 bits, which multiplies the work by 95. Here is what each alphabet buys per character:</p><table><tr><th>Alphabet</th><th>Size</th><th>Bits per character</th></tr><tr><td>Lowercase only</td><td>26</td><td>4.70</td></tr><tr><td>Upper and lower</td><td>52</td><td>5.70</td></tr><tr><td>Alphanumeric</td><td>62</td><td>5.95</td></tr><tr><td>All printable ASCII</td><td>95</td><td>6.55</td></tr></table><table><tr><th>Length</th><th>26 chars</th><th>62 chars</th><th>95 chars</th></tr><tr><td>8</td><td>37.6 bits</td><td>47.6 bits</td><td>52.4 bits</td></tr><tr><td>12</td><td>56.4 bits</td><td>71.5 bits</td><td>78.7 bits</td></tr><tr><td>16</td><td>75.2 bits</td><td>95.3 bits</td><td>104.9 bits</td></tr><tr><td>20</td><td>94.0 bits</td><td>119.1 bits</td><td>131.1 bits</td></tr></table><h2>A worked cracking estimate</h2><p>Assume an offline attack — the attacker has stolen a database and is guessing locally at a trillion candidates per second, which is realistic for a GPU rig against a fast, badly chosen hash. On average half the space must be searched.</p><table><tr><th>Password</th><th>Entropy</th><th>Average time to crack</th></tr><tr><td>8 random printable ASCII</td><td>52.4 bits</td><td>about 49 minutes</td></tr><tr><td>12 random printable ASCII</td><td>78.7 bits</td><td>about 6,000 years</td></tr><tr><td>16 random printable ASCII</td><td>104.9 bits</td><td>about 640 billion years</td></tr></table><p>The lesson is the shape of the curve, not the headline numbers. Eight characters is finished within a working day even with every symbol class included. Sixteen is not a matter of waiting for faster hardware — the gap is around fifteen orders of magnitude. <strong>Length dominates complexity.</strong> A random 16-character lowercase password (75.2 bits) is far stronger than a random 8-character password using every symbol on the keyboard (52.4 bits).</p><h2>The composition-rule myth</h2><p>The rule most of us were trained on — one uppercase, one number, one symbol, changed every ninety days — is no longer the recommendation of the body that popularised it. The 2017 revision of the United States NIST digital identity guidelines removed mandatory composition rules and removed routine expiry, and advises checking new passwords against lists of known-breached ones instead.</p><p>The reasoning is behavioural. Forced rules do not produce random passwords; they produce predictable transformations of a memorable word. Capital at the front, digit and exclamation mark at the end, <em>a</em> becomes <em>@</em>, <em>o</em> becomes <em>0</em>. Cracking tools have applied those exact substitution rules for two decades, so the entropy added is a fraction of what the rule appears to add. Forced ninety-day rotation makes it worse, because people increment a counter, and a leaked old password predicts the new one.</p><p>This also explains why browser strength meters mislead. Most score the string in front of them by counting character classes, but strength is a property of <em>how the password was chosen</em>, not how it looks. A meter cannot see that one password came from a cryptographic generator and another came from a birthday.</p><h2>Passphrases compared honestly</h2><p>A word list of 7,776 entries — the Diceware size, five dice rolls per word — gives <code>log2(7776) = 12.9</code> bits per word:</p><table><tr><th>Words</th><th>Entropy</th><th>Roughly equivalent to</th></tr><tr><td>4</td><td>51.7 bits</td><td>8 random ASCII characters</td></tr><tr><td>6</td><td>77.5 bits</td><td>12 random ASCII characters</td></tr><tr><td>7</td><td>90.5 bits</td><td>14 random ASCII characters</td></tr></table><p>So six random words are about as strong as twelve random symbols and enormously easier to remember, which makes a passphrase the right choice for the handful of passwords you must type from memory — your device login and your password manager itself. The critical condition is that the words be chosen <em>randomly</em>. A phrase you invented is not four words of entropy; it is one memory, and quoting a song lyric provides almost none.</p><h2>How the randomness is produced</h2><p>This matters more than the character set. This generator draws from the browser cryptographic random source, <code>crypto.getRandomValues</code>, which is seeded by the operating system. The ordinary <code>Math.random</code> is unsuitable: it is fast and statistically fine for shuffling a list, but its internal state can be reconstructed from a short run of outputs, which means a sequence of generated passwords becomes predictable.</p><p>There is a second, subtler trap. Mapping a random byte (0–255) onto a 95-character alphabet with a remainder operation biases the first 66 characters upward, because 256 is not a multiple of 95. Correct implementations discard out-of-range values and draw again. The bias is small but it is a real reduction in entropy, and it costs nothing to avoid.</p><h2>Honest limits</h2><p>The entropy figures above assume the attacker knows your length and alphabet and is reduced to brute force. That is the correct conservative assumption; secrecy about your character set is not security.</p><p>More importantly, a strong password solves exactly one problem — guessing. It does nothing against phishing, where you hand it over willingly; nothing against a keylogger; nothing against a breach that exposes the password in usable form; and nothing against reuse. Reuse is the dominant real-world failure: credential-stuffing attacks replay one leaked pair across hundreds of sites, and a 130-bit password reused on a site that stored it carelessly protects nothing elsewhere. Uniqueness per site matters more than the strength of any single one, which in practice means a password manager, and phishing-resistant second factors or passkeys where they are offered.</p><h2>Questions people actually ask</h2><h3>What length should I actually pick?</h3><p>Sixteen characters or more for anything stored in a password manager, since you never type it. For the few you must memorise, use a six or seven word random passphrase instead.</p><h3>Why do some sites reject my symbols or truncate my password?</h3><p>Usually legacy input filtering or a fixed database column, and occasionally the alarming sign that the password is being stored in a form where its length matters. A site with a low maximum length is worth treating as untrustworthy with anything you reuse.</p><h3>Should I change my passwords on a schedule?</h3><p>No — change them when there is a reason: a breach notification, a shared device, or any suspicion of exposure. Scheduled rotation without cause reliably degrades password quality.</p><h3>Are the passwords generated here sent anywhere?</h3><p>No. Generation happens entirely in your browser using its own random source, and nothing is transmitted, logged or stored. Nothing is kept after you close the page, so copy what you need before leaving.</p>"
  },
  "word-counter": {
    "title": "Word and Character Counter — What Counts as a Word, and Why Tools Disagree",
    "description": "Count words, characters, sentences and reading time, and understand hyphen and emoji edge cases, weighted character limits on X, and why Google truncates titles by pixel width not character count.",
    "keywords": "word counter, character counter, grapheme cluster length, twitter weighted characters, meta title pixel width, reading speed words per minute",
    "article": "<h1>There is no single definition of a word</h1><p>Every counter has to pick a rule, and the reasonable rules disagree. The common one is to trim the text and split it on runs of whitespace, counting the pieces. That is fast, language-neutral and defensible — and it produces surprises.</p><p>Take this sentence:</p><p><em>The state-of-the-art model — trained on 1,000,000 documents — did not converge.</em></p><table><tr><th>Rule</th><th>Count</th><th>Why</th></tr><tr><td>Split on whitespace</td><td>12</td><td>Both bare em-dashes become tokens of their own</td></tr><tr><td>Whitespace, ignoring punctuation-only tokens</td><td>10</td><td>The two dashes are discarded</td></tr><tr><td>Treat hyphenated compounds as separate words</td><td>13</td><td>state-of-the-art splits into four</td></tr></table><p>All three answers are correct under their own convention. This is the whole reason a word processor, a submission portal and an online counter can each give you a different number for the same paragraph — and why an essay limit of 2,000 words is best treated as approximate rather than exact.</p><p>Other cases that move the number: a number written as 1,000,000 is one token but three if commas are treated as separators; an em-dash used without surrounding spaces joins two words into one token; a URL is one token no matter how long; and in Chinese, Japanese and Thai there are no spaces at all, so whitespace splitting reports a handful of words for a full page of text.</p><h2>Characters are harder than words</h2><p>Most people expect one number and there are genuinely three, because a character can mean a storage unit, a Unicode code point, or a thing a reader perceives as one symbol:</p><table><tr><th>Text</th><th>UTF-16 units</th><th>Code points</th><th>Perceived characters</th></tr><tr><td>hello</td><td>5</td><td>5</td><td>5</td></tr><tr><td>café written with a combining accent</td><td>5</td><td>5</td><td>4</td></tr><tr><td>A single thumbs-up emoji</td><td>2</td><td>1</td><td>1</td></tr><tr><td>A four-person family emoji</td><td>11</td><td>7</td><td>1</td></tr><tr><td>A flag emoji</td><td>4</td><td>2</td><td>1</td></tr></table><p>The naive length of a string in most programming languages is the first column, which is why a database field of 20 characters can reject a nine-emoji nickname. The number a human would give is the last column, and getting it requires grapheme-cluster segmentation rather than counting.</p><h2>Platform limits, and what they really count</h2><table><tr><th>Where</th><th>Limit</th><th>Counting rule</th></tr><tr><td>X posts</td><td>280</td><td>Weighted — Latin and most European text counts 1, but CJK and several other ranges count 2, so a Japanese post caps near 140</td></tr><tr><td>Instagram caption</td><td>2,200</td><td>Only the first line or two shows before the More link</td></tr><tr><td>SMS, single segment</td><td>160</td><td>7-bit GSM alphabet; one non-GSM character switches the whole message to 70 per segment</td></tr><tr><td>Meta title</td><td>about 50–60</td><td>Truncated by pixel width, not characters</td></tr><tr><td>Meta description</td><td>about 150–160</td><td>Also pixel-based, and frequently rewritten entirely</td></tr></table><p>Two of those deserve expansion. The SMS rule catches people out constantly: typing one curly apostrophe or one emoji into a 160-character message can silently split it into two billed segments of 70. And the SEO figures are a proxy, not a rule. Search results are truncated when the rendered string exceeds an available width in pixels, so a title of narrow letters survives longer than one full of capital W and M. A 55-character title in wide characters can be cut while a 62-character title in narrow ones is not. Treat 60 as a guideline and check how the actual string looks.</p><h2>Reading time, and where the number comes from</h2><p>The estimate is simply <code>minutes = words ÷ reading speed</code>. The speed is the contested part. A 2019 meta-analysis of reading-rate studies put average silent reading of English non-fiction at roughly 238 words per minute, with fiction somewhat faster; most publishers use 200 to 250.</p><table><tr><th>Words</th><th>At 200 wpm</th><th>At 238 wpm</th><th>At 300 wpm</th></tr><tr><td>500</td><td>2.5 min</td><td>2.1 min</td><td>1.7 min</td></tr><tr><td>1,200</td><td>6.0 min</td><td>5.0 min</td><td>4.0 min</td></tr><tr><td>3,000</td><td>15.0 min</td><td>12.6 min</td><td>10.0 min</td></tr></table><p>The spread across that table is the honest error bar. Speaking is much slower — a presenter delivers roughly 130 to 150 words per minute, so a five-minute talk is about 700 words, not 1,200.</p><h2>Sentences and paragraphs are estimates too</h2><p>Sentence counting normally splits on a full stop, question mark or exclamation mark. That over-counts on abbreviations such as Dr. and e.g., on decimals such as 3.14, on ellipses, and on initials in a name; it under-counts when a writer uses semicolons or line breaks instead of terminal punctuation. Paragraph counting depends on whether a single line break or a blank line is treated as the separator, which is why pasting from a PDF can report every line as its own paragraph.</p><h2>Honest limits</h2><p>A word count measures length and nothing else. It cannot see whether a sentence is clear, whether an argument holds, or whether a paragraph earns its place — and a longer count is not a better piece of writing. Readability scores such as Flesch-Kincaid, where they are offered, are formulas over sentence and syllable length; they reward short words, which is not the same as rewarding good prose.</p><p>On the search side, there is no minimum word count that ranks and no keyword-density figure to hit. Density targets are an artefact of tools from an earlier era of search, and writing to satisfy one reliably makes text worse. Length should follow from what the topic needs.</p><h2>Questions people actually ask</h2><h3>Why does my word processor give a different number?</h3><p>Because it applies a different rule to hyphens, dashes and punctuation-only tokens. For a hard limit, count with whatever tool the person enforcing the limit uses, and leave a margin of a few per cent.</p><h3>My post is 280 characters here but the platform says it is too long. Why?</h3><p>Weighted counting. Characters outside the Latin and common European ranges count double, and a shortened link is counted as a fixed length regardless of the URL you pasted.</p><h3>Should the character count include spaces?</h3><p>It depends on who is asking. Publishers pricing by characters usually exclude spaces; platform limits and database fields include them. Both figures are shown for that reason.</p><h3>Is my text stored or read?</h3><p>No. All counting happens in your browser, and nothing you paste is transmitted, logged or saved.</p>"
  },
  "bmi-calculator": {
    "title": "BMI Calculator — The Formula, the 1832 Origin, and What It Cannot Tell You",
    "description": "Calculate BMI in metric or imperial units, with the formula worked through, healthy weight ranges by height, the different thresholds used for Asian populations, and honest limits.",
    "keywords": "bmi calculator, body mass index formula, healthy weight range by height, waist to height ratio, asian bmi cut off, quetelet index",
    "article": "<h1>The formula</h1><p>Body Mass Index is one division:</p><p><code>BMI = weight in kilograms ÷ (height in metres)²</code></p><p>In imperial units the same relationship needs a conversion constant:</p><p><code>BMI = 703 × weight in pounds ÷ (height in inches)²</code></p><h2>A worked example</h2><p>Someone 1.75 m tall weighing 78 kg:</p><table><tr><th>Step</th><th>Value</th></tr><tr><td>Height squared</td><td>1.75 × 1.75 = 3.0625</td></tr><tr><td>Divide weight by it</td><td>78 ÷ 3.0625 = 25.47</td></tr><tr><td>BMI</td><td>25.5</td></tr></table><p>The same person in imperial units — 69 inches and 172 pounds — gives <code>703 × 172 ÷ 4761 = 25.40</code>. The small gap is rounding in the unit conversion, not a different method.</p><p>That result sits just over the line into the overweight band, which illustrates something important: at 76.6 kg the same person is classified normal, and at 76.7 kg overweight. The categories are administrative cut-points on a continuous scale, and nothing about a body changes across them.</p><h2>The standard categories</h2><table><tr><th>BMI</th><th>WHO category</th></tr><tr><td>Below 18.5</td><td>Underweight</td></tr><tr><td>18.5 to 24.9</td><td>Normal range</td></tr><tr><td>25.0 to 29.9</td><td>Overweight</td></tr><tr><td>30.0 to 34.9</td><td>Obesity class I</td></tr><tr><td>35.0 to 39.9</td><td>Obesity class II</td></tr><tr><td>40.0 and above</td><td>Obesity class III</td></tr></table><h2>Healthy weight ranges by height</h2><p>Because the categories are ratios, they translate into a weight band for any height. The figures below are the 18.5 and 25.0 boundaries:</p><table><tr><th>Height</th><th>18.5 (kg)</th><th>25.0 (kg)</th></tr><tr><td>1.55 m</td><td>44.4</td><td>60.1</td></tr><tr><td>1.60 m</td><td>47.4</td><td>64.0</td></tr><tr><td>1.70 m</td><td>53.5</td><td>72.3</td></tr><tr><td>1.75 m</td><td>56.7</td><td>76.6</td></tr><tr><td>1.80 m</td><td>59.9</td><td>81.0</td></tr><tr><td>1.90 m</td><td>66.8</td><td>90.3</td></tr></table><h2>Where BMI came from — and what it was built for</h2><p>This is the part that explains most of its problems. The ratio was devised around 1832 by Adolphe Quetelet, a Belgian astronomer and statistician, as part of his work on the average man. He was describing <em>populations</em>, largely of European men, and looking for the mathematical regularities of a group. He was not proposing a way to assess an individual patient, and no health outcome data existed to validate it against.</p><p>The name body mass index was attached much later, by the physiologist Ancel Keys in 1972, who tested several height-weight ratios and found Quetelet's the best available proxy for body fatness in population studies — while stating plainly that it was suited to groups rather than individual diagnosis. In 2023 the American Medical Association adopted a policy formally acknowledging BMI as an imperfect measure that should be used alongside other assessments rather than on its own.</p><p>So a number designed for demographic statistics in the nineteenth century became a clinical shorthand in the twentieth, and that migration is the source of the mismatch people notice in their own results.</p><h2>The exponent is a compromise</h2><p>Dividing by height squared has a known bias. Mass scales with volume, which grows closer to the cube of a linear dimension, while the divisor grows with the square. The consequence is systematic: BMI reads high for tall people and low for short people of identical build. This is why an alternative using an exponent nearer 2.5 has been proposed — the square was chosen because it happened to fit mid-century European survey data reasonably well, not because it reflects how bodies scale.</p><h2>The thresholds are not universal</h2><p>Cardiometabolic risk rises at lower BMI values in several populations, particularly South and East Asian, because for a given BMI the average proportion of body fat and of visceral fat is higher. A WHO expert consultation in 2004 recognised this, and many countries now use lower action points — commonly around 23 for increased risk and 25 for high risk, rather than 25 and 30. If you are using BMI at all, use the thresholds your own health service publishes.</p><h2>Honest limits</h2><p>BMI does not measure body fat. It measures nothing but mass against height, and it cannot distinguish between:</p><ul><li>muscle and fat — a trained athlete can score in the obese range with low body fat, and this is a real and common misclassification</li><li>fat around the abdomen and fat on the hips and thighs, though the metabolic risk attached to the two differs substantially</li><li>heavy bone structure and excess weight</li><li>fluid retention and tissue</li></ul><p>It is not valid as presented for children and teenagers, who need age-and-sex percentile charts because normal body composition changes throughout growth; during pregnancy; for older adults, where height loss from spinal compression inflates the figure while muscle loss hides fat gain; or for anyone with a limb difference or a condition that alters body composition.</p><p>A single better companion measure exists and costs nothing: waist circumference, or waist divided by height. Keeping waist below half your height is a widely used rule of thumb, and it captures central adiposity — the part that carries most of the risk — which BMI is blind to.</p><p><strong>This is general information, not medical advice.</strong> BMI is a screening ratio, not a diagnosis, and no number here can tell you whether you are healthy. Blood pressure, blood lipids, blood glucose, fitness, sleep and family history all matter, and interpreting them together is a job for a doctor who can examine you.</p><h2>Questions people actually ask</h2><h3>My BMI says overweight but I lift weights. Is it wrong?</h3><p>For you, effectively yes. Muscle is denser than fat, so a muscular build inflates BMI without the associated risk. Waist measurement and body-fat estimation are far more informative in that case.</p><h3>Is BMI useless then?</h3><p>No — it is useful for what it was built for. Across large groups it tracks average risk well and it is cheap and reproducible, which is why epidemiology still uses it. The error is treating a population statistic as a verdict on one person.</p><h3>What should I track instead?</h3><p>Waist-to-height ratio is the most informative measure you can take with a tape measure. Beyond that, trends in your own numbers over months are more meaningful than any single reading against a threshold.</p><h3>Can I use this for my child?</h3><p>Not directly. Compute it if you like, but interpretation requires a paediatric percentile chart for age and sex, and that reading belongs with a paediatrician.</p><h3>Is my height and weight stored?</h3><p>No. The calculation happens in your browser and the figures you enter are never transmitted or saved.</p>"
  },
  "bill-splitter": {
    "title": "Bill Splitter — Even Splits, Itemised Shares and the Missing-Cent Problem",
    "description": "Split a restaurant bill fairly, with worked examples for even and itemised splits, proportional tax and tip, the one-multiplier shortcut, and how to handle leftover cents.",
    "keywords": "bill splitter, split the check, itemised bill split, tip before or after tax, penny rounding split, share restaurant bill fairly",
    "article": "<h1>The even split, and why it rarely lands cleanly</h1><p>The arithmetic looks trivial:</p><p><code>each person = (subtotal + tax + tip) ÷ number of people</code></p><p>The complication is that money has two decimal places and division usually does not. A total of 87.43 between three people gives 29.14333…, and if everybody pays 29.14 the table is one cent short.</p><p>The fix is to work in whole cents and distribute the remainder rather than rounding each share independently:</p><table><tr><th>Step</th><th>Value</th></tr><tr><td>Total in cents</td><td>8,743</td></tr><tr><td>Divide by 3</td><td>2,914 with remainder 1</td></tr><tr><td>Result</td><td>One person pays 29.15, two pay 29.14</td></tr></table><p>Rounding each share up instead produces 29.15 × 3 = 87.45, a two-cent overpayment. Rounding each down leaves the payer short. Remainder distribution is the only method that always reconciles exactly, and it is what a correct splitter does silently.</p><h2>The itemised split, done properly</h2><p>When people ordered different things, the fair approach is that each pays their own items <em>plus a proportional share of tax and tip</em> — not an equal share of them, because tax and tip both scale with what was ordered.</p><p>Three diners:</p><table><tr><th>Person</th><th>Items</th><th>Share of subtotal</th></tr><tr><td>A</td><td>24.00</td><td>32.43%</td></tr><tr><td>B</td><td>18.50</td><td>25.00%</td></tr><tr><td>C</td><td>31.50</td><td>42.57%</td></tr><tr><td><strong>Subtotal</strong></td><td><strong>74.00</strong></td><td>100%</td></tr></table><p>Tax at 8.5% is 6.29. Tip at 18% of the pre-tax subtotal is 13.32. The grand total is 93.61.</p><p>There is a shortcut that avoids computing three percentages. Divide the grand total by the subtotal once to get a single multiplier, then apply it to each person:</p><p><code>multiplier = 93.61 ÷ 74.00 = 1.265</code></p><table><tr><th>Person</th><th>Items × 1.265</th><th>Pays</th></tr><tr><td>A</td><td>24.00 × 1.265</td><td>30.36</td></tr><tr><td>B</td><td>18.50 × 1.265</td><td>23.40</td></tr><tr><td>C</td><td>31.50 × 1.265</td><td>39.85</td></tr><tr><td><strong>Total</strong></td><td></td><td><strong>93.61</strong></td></tr></table><p>It reconciles to the cent here, but check it every time — when it does not, the difference is a cent or two and is settled by the remainder rule above.</p><h2>Tip before or after tax</h2><p>On the same bill the choice is not trivial:</p><table><tr><th>Basis</th><th>18% tip</th><th>Grand total</th></tr><tr><td>Pre-tax subtotal (74.00)</td><td>13.32</td><td>93.61</td></tr><tr><td>Post-tax total (80.29)</td><td>14.45</td><td>94.74</td></tr></table><p>Just over a dollar apart, and about 8% more tip. Tipping on the pre-tax amount is the traditional convention, on the reasoning that you are rewarding service rather than the tax authority. Card terminals increasingly compute their suggestions on the post-tax figure, which quietly raises every percentage on the screen.</p><h2>The shared-plate problem</h2><p>This is where splitters usually break down, because it is a question about the table rather than about arithmetic. A shared appetiser has no owner. Three workable conventions:</p><ul><li><strong>Split the shared items among the people who ate them</strong>, then run the itemised method on the resulting per-person figures. Most accurate, most fiddly.</li><li><strong>Fold shared items into the subtotal and split them evenly</strong>, keeping individual items itemised. A good compromise, and what most groups do without saying so.</li><li><strong>Split everything evenly and accept the unfairness</strong>, which is often the right social answer for a bill where the spread is small.</li></ul><p>The one case where an even split is clearly wrong is alcohol. Drinks are frequently the largest and most unevenly distributed part of a bill, and in many places they are taxed at a different rate, so a non-drinker paying an even share can be subsidising a substantial amount.</p><h2>The percentage that keeps moving</h2><p>Worth knowing if the suggested figures ever feel high: the standard tip is not a fixed custom. In the middle of the twentieth century 10% was normal in the United States; 15% became the default by the 1980s; 18 to 20% is the common floor now, and card terminals often present 20, 25 and 30. Part of that drift is straightforward anchoring — a default option shifts the average choice toward it, and the presets are set by the merchant, not by any standard.</p><p>The convention is also strictly local. Service is frequently included in the bill across much of continental Europe, where a small round-up is the norm rather than a percentage. In Japan tipping is not customary and can cause confusion. And a <em>mandatory service charge</em> is not a tip at all — it is a line item on the bill, and whether it reaches the staff depends entirely on the establishment, so it is worth asking before adding a further amount on top.</p><h2>Honest limits</h2><p>A splitter can only divide the numbers you give it. It does not know who ordered what, cannot see a discount that applied to one dish, cannot apply the different tax rates that some jurisdictions levy on alcohol or prepared food separately, and cannot judge whether an even split is the socially correct answer.</p><p>Currency rounding is a real edge case. Where the smallest coin is larger than the smallest accounting unit — Canada after the withdrawal of the penny, Switzerland with its five-centime coin — cash totals round to the nearest available coin while card payments do not, so the cash and card versions of the same split differ by a few cents.</p><h2>Questions people actually ask</h2><h3>Someone only had a soda. What is fair?</h3><p>Itemise. Take their drink out, apply the multiplier method to everyone including them, and the tax and tip fall out proportionally without anyone having to negotiate.</p><h3>Why does one person pay a cent more?</h3><p>Because the total does not divide exactly. Distributing the leftover cent to one payer is the only way the payments sum to the bill; the alternative is for the table to be short or over.</p><h3>Should the tip be a percentage of the bill at all?</h3><p>It is a convention rather than a rule, and it has the odd property that a bottle of wine attracts more tip than a plate of food requiring more work. Some diners tip per person or per course for that reason. The tool will compute whatever basis you prefer.</p><h3>Is any of this stored?</h3><p>No. Every figure stays in your browser and nothing is transmitted or saved.</p>"
  },
  "break-even": {
    "title": "Break-Even Calculator — Contribution Margin, Sensitivity and Operating Leverage",
    "description": "Find the units and revenue you need to break even, with a fully worked example, a sensitivity table, margin of safety, operating leverage, and the assumptions that make the number misleading.",
    "keywords": "break even calculator, contribution margin, break even units formula, margin of safety, operating leverage, step fixed costs",
    "article": "<h1>The formula, and the number underneath it</h1><p>Break-even is where total revenue equals total cost, and it rests on one intermediate figure that matters more than the answer itself — <strong>contribution margin</strong>, the amount each sale contributes toward covering fixed costs.</p><p><code>contribution margin = price − variable cost per unit</code><br><code>break-even units = fixed costs ÷ contribution margin</code><br><code>break-even revenue = fixed costs ÷ (contribution margin ÷ price)</code></p><p>The distinction that trips people up is which costs are which. Fixed costs do not move with volume: rent, salaried wages, insurance, software subscriptions. Variable costs occur only because a unit was sold: materials, packaging, payment-processing fees, per-order shipping.</p><h2>A worked example</h2><p>A small coffee shop:</p><table><tr><th>Item</th><th>Amount</th></tr><tr><td>Rent</td><td>3,200 / month</td></tr><tr><td>Wages (salaried)</td><td>2,400 / month</td></tr><tr><td>Insurance, software, utilities</td><td>900 / month</td></tr><tr><td><strong>Fixed costs</strong></td><td><strong>6,500 / month</strong></td></tr><tr><td>Selling price per cup</td><td>4.20</td></tr><tr><td>Variable cost per cup (beans, milk, cup, card fee)</td><td>1.35</td></tr></table><table><tr><th>Step</th><th>Calculation</th><th>Result</th></tr><tr><td>Contribution margin</td><td>4.20 − 1.35</td><td>2.85 per cup</td></tr><tr><td>Margin ratio</td><td>2.85 ÷ 4.20</td><td>67.9%</td></tr><tr><td>Break-even units</td><td>6,500 ÷ 2.85</td><td>2,281 cups / month</td></tr><tr><td>Break-even revenue</td><td>2,281 × 4.20</td><td>9,580</td></tr><tr><td>Over 26 trading days</td><td>2,281 ÷ 26</td><td>88 cups / day</td></tr></table><p>That last line is the one worth converting to. A monthly figure is abstract; 88 cups a day is a claim about the business you can actually judge as plausible or not.</p><h2>What moves it — a sensitivity table</h2><p>Break-even is more sensitive to price and variable cost than to fixed cost, because those two change the divisor:</p><table><tr><th>Change</th><th>New margin</th><th>Break-even units</th><th>Shift</th></tr><tr><td>Baseline</td><td>2.85</td><td>2,281</td><td>—</td></tr><tr><td>Price up 30 cents</td><td>3.15</td><td>2,064</td><td>−9.5%</td></tr><tr><td>Price down 30 cents</td><td>2.55</td><td>2,549</td><td>+11.8%</td></tr><tr><td>Variable cost up 25 cents</td><td>2.60</td><td>2,500</td><td>+9.6%</td></tr><tr><td>Fixed costs up 500</td><td>2.85</td><td>2,456</td><td>+7.7%</td></tr></table><p>A 7% price increase cuts the required volume by nearly 10%. This is why margin work usually beats cost-cutting: the price line has leverage that the rent line does not.</p><h2>Break-even is the wrong target — use target profit instead</h2><p>Breaking even means earning nothing. To find the volume for a profit you actually want, add it to fixed costs:</p><p><code>units for target profit = (fixed costs + target profit) ÷ contribution margin</code></p><p>For 2,000 of monthly profit: <code>(6,500 + 2,000) ÷ 2.85 = 2,982 cups</code>, or 115 a day. That is 31% more volume than break-even, and it is the number a plan should be built around.</p><h2>Margin of safety and operating leverage</h2><p>Two derived figures tell you how fragile the position is. Suppose actual sales are 3,000 cups.</p><p><code>margin of safety = (3,000 − 2,281) ÷ 3,000 = 24%</code> — sales can fall by roughly a quarter before losses begin.</p><p><code>operating leverage = total contribution ÷ profit = 8,550 ÷ 2,050 = 4.17</code></p><p>That multiplier applies in both directions. A 10% rise in sales lifts profit by about 42% — 3,300 cups yields 9,405 of contribution and 2,905 of profit. A 10% fall cuts profit by the same proportion. High fixed costs and high margins produce high leverage, which is excellent above break-even and brutal below it.</p><h2>Honest limits — where this analysis misleads</h2><p>Break-even is a straight-line model, and the line bends in at least five places.</p><p><strong>Fixed costs are not fixed; they step.</strong> At some volume you need a second member of staff, a bigger machine, more space. Costs jump by a discrete amount and the break-even point resets. Plotted honestly, the cost line is a staircase, and a business can be profitable at 2,500 units and lossmaking at 3,000.</p><p><strong>Variable cost per unit is not constant.</strong> Volume brings supplier discounts, which lowers it, while overtime and rush shipping raise it.</p><p><strong>Price is not constant.</strong> Reaching higher volume often requires discounting or promotion, so the extra units arrive at a lower margin than the ones in your model.</p><p><strong>The owner is usually missing.</strong> This is the most common and most expensive error in a small-business plan. If the founder works full-time and takes no salary, their labour has been valued at zero and the break-even figure is fiction. Put a market wage for yourself into fixed costs before believing any of the output.</p><p><strong>Profit is not cash.</strong> Break-even is an accounting concept and ignores timing. A business past break-even on paper can still fail, because inventory was paid for in March and the invoice settles in June. Break-even tells you nothing about the working capital needed to get there, and cash-flow projection is a separate exercise you still have to do.</p><p>Multiple products add a further wrinkle: with more than one item you must use a weighted-average contribution margin based on the sales mix, and the break-even point moves whenever that mix shifts — even at constant total revenue. Selling the same money in low-margin items instead of high-margin ones can push you back below break-even with no visible change in the top line.</p><p>This is general business information, not financial or accounting advice. Figures for a real plan should be reviewed with an accountant who can see your actual numbers and local tax position.</p><h2>Questions people actually ask</h2><h3>Should tax be in the calculation?</h3><p>Not usually. Break-even is normally computed pre-tax, since income tax applies to profit and there is none at break-even. For a target-profit figure, decide whether the target is before or after tax and be consistent — an after-tax target must be grossed up by your rate.</p><h3>Is a business past break-even safe?</h3><p>No. It is not losing money at that moment, at that cost structure, with that mix. Margin of safety tells you how much room there is, and the answer is often less than owners expect.</p><h3>How do I classify a cost that is partly both?</h3><p>Split it. A phone line with a standing charge plus per-minute usage is fixed on the standing charge and variable on the usage. Guessing wrong here distorts the margin, which is the figure everything else depends on.</p><h3>Are my figures stored?</h3><p>No. Everything you enter stays in your browser and nothing is transmitted or saved.</p>"
  },
  "color-converter": {
    "title": "Colour Converter — HEX, RGB, HSL and CMYK Worked Through One Colour",
    "description": "Convert between HEX, RGB, HSL and CMYK with every formula shown on a single worked example, plus contrast ratios, why HSL lightness is not perceptual, and why printed CMYK never matches.",
    "keywords": "hex to rgb, rgb to hsl formula, rgb to cmyk conversion, relative luminance contrast ratio, oklch colour space, out of gamut cmyk",
    "article": "<h1>One colour, four notations</h1><p>Take <code>#FF5733</code> and convert it every way, showing the arithmetic rather than just the result.</p><p><strong>HEX to RGB</strong> is a base change. Each pair of hex digits is one byte from 0 to 255:</p><table><tr><th>Pair</th><th>Hex</th><th>Decimal</th></tr><tr><td>Red</td><td>FF</td><td>255</td></tr><tr><td>Green</td><td>57</td><td>5 × 16 + 7 = 87</td></tr><tr><td>Blue</td><td>33</td><td>3 × 16 + 3 = 51</td></tr></table><p>Three-digit codes are shorthand in which each digit is doubled, so <code>#F53</code> means <code>#FF5533</code> — a different colour from this one, which is a common source of a slightly-wrong brand shade.</p><h2>RGB to HSL</h2><p>First scale each channel to the range 0 to 1: R = 1.0, G = 0.3412, B = 0.2. Then</p><p><code>L = (max + min) ÷ 2</code><br><code>S = delta ÷ (2 − max − min)</code> when L is above 0.5<br><code>H = 60 × ((G − B) ÷ delta)</code> when red is the maximum channel</p><table><tr><th>Step</th><th>Calculation</th><th>Result</th></tr><tr><td>max, min, delta</td><td>1.0, 0.2, 0.8</td><td>—</td></tr><tr><td>Lightness</td><td>(1.0 + 0.2) ÷ 2</td><td>60%</td></tr><tr><td>Saturation</td><td>0.8 ÷ (2 − 1.0 − 0.2)</td><td>100%</td></tr><tr><td>Hue</td><td>60 × (0.3412 − 0.2) ÷ 0.8</td><td>11 degrees</td></tr></table><p>So <code>#FF5733</code> is <code>rgb(255, 87, 51)</code> and <code>hsl(11, 100%, 60%)</code>.</p><h2>RGB to CMYK</h2><p><code>K = 1 − max(R, G, B)</code>, then each ink is <code>(1 − channel − K) ÷ (1 − K)</code>:</p><table><tr><th>Ink</th><th>Calculation</th><th>Result</th></tr><tr><td>Key (black)</td><td>1 − 1.0</td><td>0%</td></tr><tr><td>Cyan</td><td>(1 − 1.0 − 0) ÷ 1</td><td>0%</td></tr><tr><td>Magenta</td><td>(1 − 0.3412) ÷ 1</td><td>66%</td></tr><tr><td>Yellow</td><td>(1 − 0.2) ÷ 1</td><td>80%</td></tr></table><h2>Why that CMYK figure is only indicative</h2><p>This is the most important caveat on any colour converter, and most omit it. The formula above is pure arithmetic with no knowledge of ink, paper or press. Real conversion is a device transform driven by an ICC profile, because the same nominal 66% magenta lays down differently on coated stock than on newsprint, and different presses have different achievable ranges.</p><p>Worse, this particular colour is <em>outside the printable range</em> for most four-colour presses. Saturated oranges, vivid blue-greens and pure greens simply cannot be mixed from CMY inks at screen intensity. When you send it to print, the profile substitutes the nearest reachable colour, which is why a bright orange on screen returns as a duller brick tone. No converter can prevent that; only choosing an in-gamut colour, or a spot ink, can.</p><h2>HSL lightness is not brightness</h2><p>The second thing worth knowing. HSL is convenient because you can lighten a colour by raising one number, but its lightness axis is a geometric midpoint, not a perceptual one. Compare two colours that HSL says are equally light:</p><table><tr><th>Colour</th><th>HSL</th><th>Relative luminance</th></tr><tr><td>Pure yellow</td><td>hsl(60, 100%, 50%)</td><td>0.928</td></tr><tr><td>Pure blue</td><td>hsl(240, 100%, 50%)</td><td>0.072</td></tr></table><p>Both report 50% lightness; one is nearly thirteen times brighter than the other. The reason is that the eye is far more sensitive to green than to blue, which the luminance coefficients capture — <code>L = 0.2126R + 0.7152G + 0.0722B</code> on gamma-decoded channels — and HSL ignores entirely. So a palette built by holding HSL lightness constant will look wildly uneven.</p><p>This also explains why naive blending misfires. sRGB values are gamma-encoded, so averaging two hex codes does not average their light. The midpoint of black and white in sRGB arithmetic is <code>#808080</code>, which emits only about 21% of white light rather than 50%, and interpolating between complementary hues through sRGB passes through a muddy grey.</p><p>The modern answer is a perceptually uniform space. CSS now supports <code>oklch</code> and <code>lab</code>, where the lightness value does correspond to perceived lightness, so two colours at the same L genuinely look equally light and gradients interpolate without dead zones. If you are building a design system, defining your palette in oklch and converting to hex for legacy output solves the evenness problem at the source.</p><h2>Contrast, which is what accessibility actually measures</h2><p>Contrast ratio uses the same luminance figure:</p><p><code>ratio = (lighter + 0.05) ÷ (darker + 0.05)</code></p><p>For our colour, the relative luminance works out to 0.283:</p><table><tr><th>Pairing</th><th>Ratio</th><th>WCAG result</th></tr><tr><td>#FF5733 on white</td><td>3.15 : 1</td><td>Fails AA body text; passes large text and UI components</td></tr><tr><td>#FF5733 on black</td><td>6.66 : 1</td><td>Passes AA; just short of AAA</td></tr><tr><td>Black on white</td><td>21 : 1</td><td>The maximum possible</td></tr></table><p>The thresholds are 4.5 to 1 for normal text, 3 to 1 for large text and interface elements, and 7 to 1 for the stricter AAA level. A vivid brand colour that fails on white is extremely common — the usual fix is to keep it for large headings, buttons and accents, and use a darkened variant for body copy.</p><h2>Honest limits</h2><p>Conversions between HEX, RGB and HSL are exact and lossless, because all three describe the same sRGB coordinates. Everything else is an approximation:</p><ul><li>CMYK output is a preview, not a print specification, without an ICC profile</li><li>Uncalibrated monitors, and different display gamuts, mean the same hex code genuinely looks different on two screens</li><li>Eight bits per channel gives 16.7 million colours but visible banding across a wide, subtle gradient</li><li>Perceived colour depends on what surrounds it — the same swatch reads differently against light and dark backgrounds — and on ambient light</li><li>Roughly one in twelve men has some red-green colour vision deficiency, so colour must never be the only carrier of meaning</li></ul><h2>Questions people actually ask</h2><h3>Why did my printed colour come out dull?</h3><p>Almost always out-of-gamut clipping. Check the colour against a CMYK profile for the actual paper and press before approving artwork, and expect saturated oranges, greens and blues to shift most.</p><h3>What is the K in CMYK for, if cyan, magenta and yellow can make black?</h3><p>In theory they can; in practice equal parts of all three make a muddy brown, use three times the ink, and soak the paper. A dedicated black ink gives crisp text and cheaper coverage.</p><h3>Which space should I define a palette in?</h3><p>oklch if your targets support it, because equal lightness values look equal and tints and shades come out evenly spaced. Convert to hex for anywhere that needs it.</p><h3>Are the colours I enter stored?</h3><p>No. Every conversion runs in your browser and nothing you enter is transmitted or saved.</p>"
  },
  "compound-interest": {
    "title": "Compound Interest Calculator — Frequency, APY, Fees and the Inflation Correction",
    "description": "Project growth with the compound interest formula worked step by step, compare compounding frequencies and APY, test the rule of 72, and see what fees and inflation remove from the result.",
    "keywords": "compound interest calculator, apr vs apy, compounding frequency comparison, rule of 72 accuracy, real vs nominal return, fee drag on investments",
    "article": "<h1>The formula</h1><p><code>A = P × (1 + r ÷ n) ^ (n × t)</code></p><p>where P is the starting amount, r the annual nominal rate as a decimal, n the number of compounding periods per year, and t the number of years. If you add money regularly, a second term is needed for the stream of deposits:</p><p><code>future value of deposits = PMT × ((1 + i) ^ N − 1) ÷ i</code></p><p>with i the rate per period and N the number of periods. The two results are added.</p><h2>A worked example</h2><p>10,000 invested for 20 years at 7% nominal, compounded annually:</p><table><tr><th>Step</th><th>Value</th></tr><tr><td>Growth factor</td><td>1.07 ^ 20 = 3.8697</td></tr><tr><td>Final balance</td><td>10,000 × 3.8697 = 38,697</td></tr><tr><td>Of which interest</td><td>28,697</td></tr></table><p>Now add 500 a month at the same rate compounded monthly. The rate per period is 0.0058333 and there are 240 periods:</p><table><tr><th>Component</th><th>Value</th></tr><tr><td>Initial 10,000 grown monthly</td><td>40,375</td></tr><tr><td>Annuity factor — (1.0058333 ^ 240 − 1) ÷ 0.0058333</td><td>520.71</td></tr><tr><td>500 × 520.71</td><td>260,355</td></tr><tr><td><strong>Total</strong></td><td><strong>300,730</strong></td></tr><tr><td>Total paid in</td><td>130,000</td></tr><tr><td>Growth</td><td>170,730 — about 57% of the balance</td></tr></table><h2>Does compounding frequency matter?</h2><p>Less than the marketing suggests. Same 10,000, same 7%, same 20 years:</p><table><tr><th>Compounded</th><th>Effective annual rate</th><th>Final balance</th></tr><tr><td>Annually</td><td>7.000%</td><td>38,697</td></tr><tr><td>Semi-annually</td><td>7.123%</td><td>39,593</td></tr><tr><td>Quarterly</td><td>7.186%</td><td>40,064</td></tr><tr><td>Monthly</td><td>7.229%</td><td>40,375</td></tr><tr><td>Daily</td><td>7.250%</td><td>40,532</td></tr><tr><td>Continuously</td><td>7.251%</td><td>40,552</td></tr></table><p>The whole span from annual to continuous is 4.8%, and almost all of it is captured by the time you reach monthly. Daily compounding is a rounding difference. Rate and time do the work; frequency is a detail.</p><p>That effective-rate column is the difference between <strong>APR</strong> and <strong>APY</strong>. APR is the nominal rate before compounding; APY is what you actually earn once compounding is applied. A 7% APR compounded monthly is a 7.229% APY, which is why a savings account advertising one number and a loan advertising the other are not directly comparable. Always compare like with like.</p><h2>The rule of 72, and where it breaks</h2><p>Dividing 72 by the percentage rate estimates the doubling time. It is a good shortcut in a narrow band:</p><table><tr><th>Rate</th><th>Rule of 72</th><th>Exact</th><th>Error</th></tr><tr><td>2%</td><td>36.0 years</td><td>35.0</td><td>+2.9%</td></tr><tr><td>7%</td><td>10.3 years</td><td>10.24</td><td>+0.4%</td></tr><tr><td>8%</td><td>9.0 years</td><td>9.01</td><td>−0.1%</td></tr><tr><td>20%</td><td>3.6 years</td><td>3.80</td><td>−5.3%</td></tr></table><p>The exact figure is <code>ln(2) ÷ ln(1 + r)</code>. The rule is calibrated near 8% and drifts either side; for continuous compounding the correct numerator is 69.3, and 72 was chosen historically because it divides neatly by 2, 3, 4, 6, 8, 9 and 12.</p><h2>What the headline number is hiding</h2><p>Two deductions turn an impressive projection into a realistic one, and most calculators show neither.</p><p><strong>Fees compound too.</strong> A 1% annual charge does not cost 1%; it removes a percentage point from the growth rate for every year of the run. On the original example, 7% becomes 6%:</p><table><tr><th>Net rate</th><th>Balance after 20 years</th></tr><tr><td>7.0%</td><td>38,697</td></tr><tr><td>6.0%</td><td>32,071</td></tr></table><p>One percentage point of fee removed 6,626 — about 17% of the final balance, from a charge that reads as trivial on a statement. Over 30 years the same gap costs around 24%.</p><p><strong>Inflation removes more.</strong> The 300,730 figure above is in future currency. With inflation at 3%, prices rise by a factor of <code>1.03 ^ 20 = 1.806</code>, so that balance buys what <strong>166,490</strong> buys today. The real rate is not 7% minus 3% but <code>1.07 ÷ 1.03 − 1 = 3.88%</code>. More than 40% of the apparent gain is the currency shrinking rather than the portfolio growing.</p><p>The practical fix is to run the projection in real terms — use an inflation-adjusted rate and read the answer as today money — or to run both and quote the pair. A projection stated only in nominal terms flatters itself.</p><h2>About that Einstein quote</h2><p>You will see compound interest described as the eighth wonder of the world, or the most powerful force in the universe, attributed to Albert Einstein. There is no evidence he said either. Neither line appears in his writings, letters or recorded remarks, and the attributions surface in print decades after his death — most often in advertising for financial products. It is a marketing flourish that acquired a famous name, and it is worth noticing that the claim most often used to sell compounding is itself fabricated. The mathematics needs no celebrity endorsement.</p><h2>Honest limits</h2><p>The formula assumes a constant rate, and no investment delivers one. A portfolio averaging 7% arrives at that average through good and bad years, and the <em>order</em> of those years changes the outcome whenever money is being added or withdrawn — the same average return can produce materially different balances. Compound interest models a bank deposit accurately and a stock market only as a smoothed long-run average.</p><p>Other omissions to hold in mind: tax on interest, dividends or gains is not modelled, and where it applies annually it reduces the compounding base; contributions held flat in nominal terms shrink in real value each year, so a plan should escalate them with inflation; and the projection assumes you never interrupt the deposits, which real life rarely permits.</p><p>This is general information, not financial advice. Any rate entered here is an assumption, not a forecast, and decisions about your own money warrant a qualified adviser who can see your full position.</p><h2>Questions people actually ask</h2><h3>What rate should I assume?</h3><p>Whatever you assume, run a lower one beside it. The gap between a 5% and an 8% assumption over 30 years is larger than most people expect, and planning to the optimistic figure is how projections fail. Historical averages are not promises.</p><h3>Why is my bank quoting a different number from mine?</h3><p>Usually APR against APY, or a different compounding basis, or an introductory rate that reverts. Ask for the effective annual yield and the date it changes.</p><h3>Is monthly compounding worth switching accounts for?</h3><p>Rarely on its own — see the frequency table, where the whole range is under 5% of the outcome. A meaningfully higher rate or a lower fee matters far more.</p><h3>Are my figures stored?</h3><p>No. The projection runs in your browser and nothing you enter is transmitted or saved.</p>"
  },
  "css-gradient": {
    "title": "CSS Gradient Generator — Angles, the Grey Dead Zone and Banding Fixes",
    "description": "Build linear, radial and conic CSS gradients, with the angle convention explained, the gradient-line length formula, why sRGB interpolation muddies colours, and how to kill visible banding.",
    "keywords": "css gradient generator, linear gradient angle, gradient banding fix, oklch gradient interpolation, conic gradient, animate css gradient",
    "article": "<h1>The syntax, and the angle nobody gets right first time</h1><p>A linear gradient takes a direction followed by colour stops:</p><p><code>background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);</code></p><p>The angle convention is the usual first stumble. In CSS, <strong>0deg points upward and angles increase clockwise</strong>:</p><table><tr><th>Angle</th><th>Direction</th><th>Keyword equivalent</th></tr><tr><td>0deg</td><td>Upward</td><td>to top</td></tr><tr><td>90deg</td><td>Rightward</td><td>to right</td></tr><tr><td>180deg</td><td>Downward</td><td>to bottom</td></tr><tr><td>135deg</td><td>Down and right</td><td>to bottom right, on a square</td></tr></table><p>Two traps live here. Mathematical convention puts 0 to the right and counts anticlockwise, so a gradient translated from a design tool is frequently rotated by 90 degrees. And the keyword <code>to bottom right</code> is not identical to <code>135deg</code> — the keyword aims the gradient at the actual corner, so its angle changes with the box aspect ratio, while a degree value is fixed.</p><h2>How long is the gradient line?</h2><p>Useful when you want a stop to land on an exact pixel. For a box of width W and height H at angle A, the gradient line is</p><p><code>length = |W × sin(A)| + |H × cos(A)|</code></p><p>On a 400 by 200 box at 135deg, where sine and cosine are both 0.7071 in magnitude:</p><table><tr><th>Term</th><th>Value</th></tr><tr><td>400 × 0.7071</td><td>282.84</td></tr><tr><td>200 × 0.7071</td><td>141.42</td></tr><tr><td><strong>Gradient line</strong></td><td><strong>424.26 px</strong></td></tr></table><p>So 50% is 212 pixels along that diagonal, not 200 across the width. Percentages are measured along the gradient line, which is why a stop that looks right on a wide element drifts when the element becomes tall.</p><h2>The grey dead zone</h2><p>Interpolate blue to yellow and the middle turns grey. This is not a browser bug — it is a consequence of averaging gamma-encoded sRGB channels. The numeric midpoint of <code>#0000FF</code> and <code>#FFFF00</code> is <code>#808080</code>, a dead neutral, because the two colours sit on opposite sides of the colour cube and the straight line between them passes through its centre.</p><p>There are three ways out:</p><ul><li><strong>Interpolate in a better space.</strong> <code>linear-gradient(in oklch, blue, yellow)</code> travels around the hue circle instead of through the middle, and the result stays saturated across the whole run. This is the modern fix and it is a one-word change.</li><li><strong>Add a midpoint stop</strong> in a hue you actually want, which forces the path through it.</li><li><strong>Choose adjacent hues.</strong> Indigo to violet to pink never crosses the neutral centre, which is why analogous palettes look clean with no extra work.</li></ul><p>A related trap: fading to <code>transparent</code>. That keyword expands to fully transparent <em>black</em>, so a white-to-transparent fade can pick up a grey cast in engines that do not premultiply. Writing the explicit <code>rgba(255, 255, 255, 0)</code> removes the ambiguity.</p><h2>Banding, and the arithmetic behind it</h2><p>Subtle gradients show visible stripes because each channel has only 256 values. Take a background running from <code>#1a1a2e</code> to <code>#16213e</code>: the blue channel moves from 46 to 62, which is 17 distinct values for the whole width. Spread across 1,200 pixels that gives bands roughly 70 pixels wide — unmissable on a large screen.</p><table><tr><th>Channel travel</th><th>Bands available</th><th>Band width over 1,200 px</th></tr><tr><td>16 values</td><td>17</td><td>71 px</td></tr><tr><td>60 values</td><td>61</td><td>20 px</td></tr><tr><td>200 values</td><td>201</td><td>6 px</td></tr></table><p>The practical remedies are to increase the colour distance, to shorten the gradient, to overlay a faint noise texture that dithers the boundaries, or to add intermediate stops so the browser interpolates over shorter runs. Angled gradients band less visibly than perfectly horizontal or vertical ones, because the edges are not aligned with the pixel grid.</p><h2>Hard stops, radial and conic</h2><p>Placing two stops at the same position produces a hard edge instead of a blend — <code>linear-gradient(90deg, #6366f1 50%, #ec4899 50%)</code> is two solid halves, and repeating that pattern is how stripes, checkerboards and progress bars are drawn without images.</p><p>Radial gradients take a shape and a size, and the sizing keyword matters more than the colours: <code>farthest-corner</code> is the default, while <code>closest-side</code> produces a much tighter falloff. Conic gradients sweep around a centre point, which makes pie charts and colour wheels possible in pure CSS, and combined with <code>repeating-conic-gradient</code> they draw radial stripes.</p><h2>On vendor prefixes — do not add them</h2><p>Older tutorials, and many generators, still emit a stack of prefixed duplicates. That advice is not merely obsolete, it is actively harmful: <code>-webkit-linear-gradient</code> used the <em>old</em> angle convention, where 0deg pointed to the right. Pasting a prefixed line beneath an unprefixed one with the same angle value therefore describes a gradient rotated 90 degrees, and any browser that prefers the prefixed rule renders the wrong thing. Unprefixed gradients have been universally supported for over a decade. Emit one clean declaration.</p><h2>Performance and motion</h2><p>Gradients are painted, not composited. A transform or an opacity change can be handled by the GPU without repainting; changing a gradient, or animating <code>background-position</code> across a large area, forces a repaint every frame and will drop frames on a big hero section or a low-powered phone.</p><p>Gradients are also not interpolatable by default, so a CSS transition between two <code>background-image</code> values snaps rather than blends. The workable patterns are to stack two gradient layers and animate the opacity of the top one, or to register a custom property with <code>@property</code> so its value becomes animatable, or to animate a transform on an oversized gradient element. And if a gradient animates continuously, honour <code>prefers-reduced-motion</code> — moving background colour is a common trigger for people with vestibular sensitivity.</p><h2>Honest limits</h2><p>Text over a gradient has <em>varying</em> contrast, and the standard tools check one pair of colours. Test the worst point along the run, not the average, or place a semi-transparent scrim behind the text so the ratio is constant.</p><p>Gradients are unreliable in email — desktop Outlook ignores <code>background-image</code> entirely, so a gradient there needs a fallback background colour that is legible on its own. Many browsers omit backgrounds when printing unless the user opts in. And a gradient can never be a substitute for meaning: if it distinguishes one state from another, that state needs a non-visual signal too.</p><h2>Questions people actually ask</h2><h3>Why does my gradient look striped?</h3><p>Eight-bit banding. Widen the colour distance, add stops, or dither with a noise overlay — see the table above for how few steps a subtle gradient really has.</p><h3>Why is my gradient rotated compared with my design file?</h3><p>Different zero point. Design tools commonly measure from the right and anticlockwise; CSS measures from the top and clockwise.</p><h3>Can I transition smoothly between two gradients?</h3><p>Not directly. Cross-fade two stacked layers with opacity, which is also the cheaper option to render.</p><h3>Is anything I create here stored?</h3><p>No. The preview and the generated CSS are produced in your browser, and nothing is transmitted or saved.</p>"
  },
  "json-formatter": {
    "title": "JSON Formatter and Validator — Every Way Valid JSON Goes Wrong",
    "description": "Format and validate JSON in your browser, with the six value types, the syntax JSON does not allow, the large-integer precision trap, duplicate keys and prototype pollution explained.",
    "keywords": "json formatter, json validator, json trailing comma error, json large integer precision, duplicate keys json, jsonc comments tsconfig",
    "article": "<h1>JSON is smaller than most people think</h1><p>The whole grammar, standardised as RFC 8259 and ECMA-404, permits exactly six kinds of value: object, array, string, number, boolean and null. Keys must be strings in double quotes. That is the entire specification, and almost every error people hit comes from assuming something else is allowed.</p><table><tr><th>What people write</th><th>Why it fails</th></tr><tr><td>A key without quotes</td><td>Keys must be quoted strings, always</td></tr><tr><td>A string in single quotes</td><td>Only double quotes are strings in JSON</td></tr><tr><td>A comma after the last item</td><td>Trailing commas are not permitted</td></tr><tr><td>A comment on its own line</td><td>JSON has no comments at all</td></tr><tr><td>NaN, Infinity or undefined</td><td>None of these are JSON values</td></tr><tr><td>A date</td><td>There is no date type — dates are strings by convention</td></tr><tr><td>Wrapping the whole thing in a function call</td><td>That is JSONP, not JSON</td></tr></table><h2>A worked diagnosis</h2><p>This fragment contains three separate errors, and most editors report only the first:</p><p><code>{ id: 1, name: two, tags: [a, b,] }</code></p><table><tr><th>Position</th><th>Problem</th><th>Fix</th></tr><tr><td>The keys</td><td>Unquoted identifiers</td><td>Quote every key</td></tr><tr><td>The values</td><td>Bare words are not strings</td><td>Quote every string value</td></tr><tr><td>After the last array item</td><td>Trailing comma</td><td>Remove it</td></tr></table><p>The reason errors cascade like this is that a parser fails at the first byte it cannot account for and reports a character offset, not a diagnosis. A message about an unexpected token at position 2 usually means the problem started earlier — a quote you closed too soon, or an opening brace with no partner.</p><p>Two error messages worth recognising on sight. An unexpected token at <em>position 0</em> often means the file begins with a UTF-8 byte order mark, an invisible three-byte prefix that some Windows editors add; the JSON is otherwise perfect and looks it. And an unexpected end of input means a bracket or brace was never closed, which formatting will locate immediately once the rest parses.</p><h2>The large-number trap</h2><p>This one silently corrupts data, and it is the most consequential item on the page. JSON numbers have no size limit in the specification, but JavaScript parses every number as a double-precision float. Integers stay exact only up to 2 to the 53rd power minus one, which is 9,007,199,254,740,991.</p><table><tr><th>Value in the JSON text</th><th>Value after parsing in JavaScript</th></tr><tr><td>9007199254740992</td><td>9007199254740992</td></tr><tr><td>9007199254740993</td><td>9007199254740992 — changed</td></tr><tr><td>0.1 plus 0.2</td><td>0.30000000000000004</td></tr></table><p>No error is raised. The number simply comes out different. This is why large-scale APIs that use 64-bit identifiers also send a string version of the same field — the numeric one cannot survive a round trip through a JavaScript client. If you are designing an API, send identifiers, currency amounts and anything else that must be exact as strings, and parse them deliberately.</p><h2>Duplicate keys are undefined behaviour</h2><p>The specification does not say what should happen when the same key appears twice in one object. In practice most parsers keep the last occurrence, some keep the first, and a few raise an error.</p><p>That ambiguity has a security consequence. If a request passes through two components that use different parsers — a gateway that validates and a service that acts — and each resolves duplicates differently, then one document can mean two things. A validator sees the harmless first value while the service acts on the second. The defence is to reject duplicate keys outright rather than to pick a winner.</p><p>A related class of bug: a key of <code>__proto__</code> in JSON is a harmless string as far as parsing goes, but if the parsed object is then merged into an existing object with a naive deep-merge routine, it can alter the prototype chain and change behaviour across an entire application. This is prototype pollution, and it is a real vulnerability class rather than a curiosity. Parsing is safe; careless merging afterwards is not.</p><h2>Strings and Unicode</h2><p>JSON strings are sequences of Unicode characters, with escape forms for the double quote, the backslash itself, newline, tab, carriage return, form feed, backspace, and a four-hex-digit numeric form. Characters outside the basic multilingual plane — most emoji, many historic scripts — need <em>two</em> of those numeric escapes forming a surrogate pair. A single unpaired half is technically invalid, and parsers differ on whether they reject it or pass it through as a damaged character, which is a common cause of text that looks fine in one system and broken in the next.</p><p>The encoding itself should always be UTF-8. The specification permits it exclusively for data exchanged between systems, so a file in a legacy single-byte encoding will parse but produce mangled non-ASCII text.</p><h2>The relatives that are not JSON</h2><table><tr><th>Format</th><th>Adds</th><th>Where you meet it</th></tr><tr><td>JSONC</td><td>Comments</td><td>Editor and compiler config files</td></tr><tr><td>JSON5</td><td>Comments, trailing commas, unquoted keys, single quotes</td><td>Human-edited configuration</td></tr><tr><td>JSON Lines</td><td>One JSON value per line, no enclosing array</td><td>Logs and streaming pipelines</td></tr></table><p>This is why a configuration file ending in .json that is full of comments is not valid JSON and will be rejected by a strict validator, even though the tool that owns it reads it happily. If a formatter refuses your config, check whether the file is actually JSONC before assuming the file is broken.</p><h2>Honest limits</h2><p>A formatter checks <em>syntax</em>, not meaning. Valid JSON can still be wrong for its purpose: a missing required field, a string where a number was expected, an enumerated value outside the allowed set. Catching those requires a schema — JSON Schema is the usual tool — and no beautifier can substitute for it.</p><p>Formatting also does not change your data, and that includes key order. Order carries no meaning in a JSON object as far as the specification goes, but version-control diffs and checksums care very much, so a reformat that reorders keys will produce a large and misleading diff.</p><p>Practical constraints: very large documents will freeze a browser tab, because the whole structure must be held in memory at once alongside the formatted output; deeply nested structures can exhaust the parser stack; and streaming formats such as JSON Lines must be split by line before each record is parsed.</p><p>One security habit worth keeping regardless of any privacy claim: avoid pasting production credentials, tokens or personal data into any web tool as a matter of routine. This page processes text in your browser and sends nothing, and you can confirm that yourself by watching the network panel in developer tools — but the general practice of not circulating live secrets through utilities is the stronger protection.</p><h2>Questions people actually ask</h2><h3>Why does my JSON fail when the same file works in my editor?</h3><p>Comments or trailing commas, almost always. Your editor is reading it as JSONC; a validator is reading it as JSON.</p><h3>My identifier changed by one digit. What happened?</h3><p>Floating-point rounding above 2 to the 53rd. Ask for the identifier as a string, or parse it with a big-integer aware reviver.</p><h3>Does the formatter alter my values?</h3><p>No. Only whitespace changes. If a value looks different afterwards, the parser altered it — which points to the number precision issue above.</p><h3>Is my payload sent anywhere?</h3><p>No. Parsing, validation and formatting all happen in your browser, and nothing you paste is transmitted, logged or stored.</p>"
  },
  "lorem-ipsum": {
    "title": "Lorem Ipsum Generator — Its Real Source in Cicero, and When Not to Use It",
    "description": "Generate placeholder text by words, sentences or paragraphs, plus the actual origin of Lorem Ipsum in Cicero, why the 1500s story is unverified, and the design problems greeking hides.",
    "keywords": "lorem ipsum generator, lorem ipsum meaning, cicero de finibus placeholder, greeking text, pseudolocalization, content first design",
    "article": "<h1>Lorem is not a word</h1><p>The most-repeated fact about Lorem Ipsum — that it is meaningless nonsense — is wrong. It is mangled Latin taken from a real book: Cicero&#39;s <em>De finibus bonorum et malorum</em>, on the ends of good and evil, written in 45 BC. The relevant passage in Book 1 runs roughly <em>neque porro quisquam est qui dolorem ipsum quia dolor sit amet consectetur adipisci velit</em>, which means, approximately, that nobody loves pain simply because it is pain.</p><p>The filler begins mid-word. The original has <strong>dolorem ipsum</strong>; the placeholder lost the first three letters and starts at <strong>lorem ipsum</strong>. So the phrase everybody knows is the tail of a Latin word for pain, cut off at an arbitrary point.</p><p>The identification is credited to a Latin scholar, Richard McClintock, who noticed that the filler contained <em>consectetur</em> — a word rare enough to trace — and followed it back to Cicero.</p><h2>The 1500s claim is unverified</h2><p>Nearly every generator repeats a line about an unknown printer scrambling the text in the 1500s to make a type specimen book. There is no documented evidence for that story. It circulates because one widely copied page said it and thousands of others copied the page.</p><p>What <em>is</em> traceable is the modern route. The text was distributed at scale on dry-transfer lettering sheets in the 1960s and 1970s, which is how it reached a generation of graphic designers, and then it was bundled into early desktop publishing software in the 1980s — which is how it reached everyone else. The Cicero source is documented; the Renaissance printer is folklore. Given that the sentence appears in the previous version of this very page, it seemed worth correcting rather than repeating.</p><h2>Why greeking works at all</h2><p>The point of placeholder text is to let you judge a text block as a <em>shape</em> — its greyness, line length, leading, rag — without reading it. Recognisable language defeats that, because you start editing the copy instead of assessing the layout.</p><p>Latin is well suited to the job for a specific reason: it looks like European prose without being readable to most people. But it is not a neutral substitute for English, and the differences matter:</p><table><tr><th>Property</th><th>Lorem Ipsum</th><th>Running English</th></tr><tr><td>Average word length</td><td>Noticeably longer</td><td>Shorter, dominated by function words</td></tr><tr><td>Very short words</td><td>Few</td><td>Very many — the, a, of, to, and</td></tr><tr><td>Apostrophes</td><td>None</td><td>Frequent</td></tr><tr><td>Numerals</td><td>None</td><td>Common</td></tr><tr><td>Letters k, w, y, z</td><td>Rare or absent</td><td>Ordinary</td></tr><tr><td>Resulting text block</td><td>Slightly darker and more even</td><td>Lighter, more ragged</td></tr></table><p>The practical consequence is that a paragraph set in Lorem Ipsum flows more evenly than the same paragraph of English will. Line breaks fall differently, hyphenation is triggered at different points, and a rag that looked clean in the mockup can develop awkward gaps once real sentences arrive.</p><h2>Generate the right amount</h2><p>Placeholder text is most useful when its length matches what will actually be there. Rough targets:</p><table><tr><th>Slot</th><th>Realistic length</th></tr><tr><td>Page title or hero heading</td><td>4 to 9 words</td></tr><tr><td>Subheading</td><td>8 to 15 words</td></tr><tr><td>Card or teaser summary</td><td>15 to 25 words</td></tr><tr><td>Meta description</td><td>about 155 characters</td></tr><tr><td>Product description</td><td>80 to 150 words</td></tr><tr><td>Article paragraph</td><td>40 to 80 words</td></tr></table><p>Generating three fat paragraphs for a slot that will hold twenty words is the commonest way a design passes review and then breaks.</p><h2>Where placeholder text actively misleads</h2><p>This is the part worth taking seriously, because greeking hides exactly the problems that surface late and cost most.</p><p><strong>It hides content that does not fit.</strong> If the real headline is eleven words and the mockup used four, the design was never tested. Filler is uniformly well behaved — no long proper nouns, no all-caps acronyms, no unbroken URLs, no product names with a trademark symbol.</p><p><strong>It hides the hard languages entirely.</strong> German compounds are far longer than their English equivalents and overflow fixed-width buttons; Arabic and Hebrew run right to left and need the whole layout mirrored; Chinese, Japanese and Thai have no spaces, so line breaking follows different rules altogether; and diacritics can collide with tight line height. Latin filler tests none of this. The professional alternative is pseudolocalization — expanding the real strings by 30 to 40% and adding accents and brackets — which surfaces truncation and hard-coded text before translation begins.</p><p><strong>It postpones the questions the design exists to answer.</strong> Designing with real or realistic content tends to change the design, because the moment you write the actual headline you discover it needs two lines, or that the three benefits are really five. That is an argument for content-first work rather than against placeholder text altogether — filler is a typographic instrument, not a substitute for knowing what the page says.</p><p><strong>It ships.</strong> Lorem Ipsum reaching production is common enough to be a running joke, and search engines index it happily. Screen readers will attempt to pronounce it. If you use it, leave a marker the build can find, and check for the string before deploying.</p><h2>Honest limits</h2><p>The text is not translatable, because it is scrambled — words have been reordered, truncated and in places altered, so it is Latin-shaped rather than Latin. It carries no meaning in the assembled form and should not be presented as a quotation.</p><p>It is also only a proxy for one kind of judgement. It will tell you whether a measure is comfortable, whether leading is adequate and whether a grid holds together. It will not tell you whether the hierarchy makes sense, whether the reader can find the action, or whether the page says anything, and no amount of it will.</p><h2>Questions people actually ask</h2><h3>Does Lorem Ipsum harm SEO?</h3><p>Only if it is published. A page indexed with filler text has no useful content, which is exactly the signal you do not want. On staging or in a mockup it is irrelevant to search entirely.</p><h3>Why not repeat one sentence instead?</h3><p>Repetition produces a visible vertical pattern in the text block, which distorts the very impression of texture you were trying to assess. Varied word lengths are the point.</p><h3>Should I use real content instead?</h3><p>Where you can, yes — or at least content of realistic length and shape, including the awkward cases. Keep filler for early typographic exploration and for slots whose content genuinely does not exist yet.</p><h3>Is anything I generate here stored?</h3><p>No. The text is assembled in your browser and nothing is transmitted or saved.</p>"
  },
  "pomodoro-timer": {
    "title": "Pomodoro Timer — The Rules Most Apps Leave Out, and What the 25 Minutes Really Is",
    "description": "A Pomodoro timer with the full method: the indivisibility and void rules, estimating work in pomodoros, the daily arithmetic, and an honest account of what the evidence does and does not support.",
    "keywords": "pomodoro timer, pomodoro technique rules, why 25 minutes pomodoro, estimating in pomodoros, void pomodoro interruption, break schedule focus",
    "article": "<h1>Where the 25 minutes came from</h1><p>Francesco Cirillo devised the method as a university student in the late 1980s, using a tomato-shaped kitchen timer — <em>pomodoro</em> is Italian for tomato. The interval was the one his timer offered, and he has described starting with a much shorter period and settling on 25 minutes because it worked for him.</p><p>That is worth saying plainly, because the number is usually presented as though it were a research finding about attention span. It is not. It is a practical default that turned out to be a reasonable one, and the technique does not depend on it being optimal.</p><h2>The rules that actually make it work</h2><p>Most timer apps implement the clock and drop the method, which is why people try it, find it unremarkable and stop. The mechanism is not the countdown; it is the discipline around it.</p><p><strong>A pomodoro is indivisible.</strong> There is no half pomodoro. Either you completed twenty-five minutes on one task, or you did not.</p><p><strong>An interrupted pomodoro is void.</strong> If you break off and cannot resume immediately, it does not count and you start a fresh one. This sounds harsh and it is the entire point — it puts a real price on picking up your phone, which is the only reason the rule changes behaviour.</p><p><strong>Interruptions get written down, not acted on.</strong> When something occurs to you mid-interval — an email to send, a thing to look up — you note it on a sheet and continue. For interruptions from other people, Cirillo prescribes a sequence: acknowledge, negotiate a time, call back, and honour it. The note-and-defer habit is what makes the interval defensible.</p><p><strong>When the timer rings you stop.</strong> Even mid-sentence, even when it is going well. This is the most-broken rule and the one that protects the following four hours.</p><p><strong>You record every completed pomodoro.</strong> The tally is the feedback loop. Without it the technique is just a timer.</p><h2>Estimation is the real payoff</h2><p>The part almost everyone skips is where the improvement comes from. Before starting, estimate each task in whole pomodoros. Afterwards, record how many it took.</p><table><tr><th>Task</th><th>Estimated</th><th>Actual</th><th>Error</th></tr><tr><td>Draft the proposal</td><td>3</td><td>5</td><td>+67%</td></tr><tr><td>Fix the reporting bug</td><td>2</td><td>4</td><td>+100%</td></tr><tr><td>Clear the review queue</td><td>4</td><td>3</td><td>−25%</td></tr></table><p>The first weeks look like this for nearly everybody, and the systematic direction of the error is the finding. Underestimation of your own tasks is robust and well documented, and no amount of resolving to be realistic fixes it. Comparing estimates against a tally does, slowly, because a pomodoro is a fixed unit and the record is unambiguous. After a month or two most people can size familiar work within one unit.</p><p>Anything that exceeds five to seven pomodoros should be split; anything under one should be batched with other small items. That sizing rule is a planning discipline that survives even if you abandon the timer.</p><h2>The daily arithmetic</h2><table><tr><th>Unit</th><th>Composition</th><th>Elapsed</th></tr><tr><td>One pomodoro</td><td>25 work + 5 break</td><td>30 min</td></tr><tr><td>One set</td><td>4 pomodoros, last break extended to 20</td><td>135 min</td></tr><tr><td>Realistic day</td><td>8 to 12 pomodoros</td><td>3 h 20 to 5 h of timed work</td></tr><tr><td>Working week</td><td>50 pomodoros</td><td>20.8 h</td></tr></table><p>Two things fall out of that table. First, a full day does not contain sixteen pomodoros once meetings, email and lunch are counted — planning for more than about twelve is planning to fail. Second, twenty focused hours a week is a great deal more deliberate work than most weeks contain, so the low number is not a disappointment.</p><h2>What the evidence supports, and what it does not</h2><p>Being straight about this: there is no strong body of controlled research establishing that 25 and 5 is the optimal ratio, or that the Pomodoro Technique outperforms other structured break schedules. Claims to that effect are marketing.</p><p>What is better supported sits underneath the method rather than in its specific numbers. Performance on sustained attention tasks degrades over time, and breaks reduce that decline. Deciding in advance exactly when and on what you will work — an implementation intention — reliably improves follow-through compared with a general intention. Recovering from an interruption costs far more than the interruption itself. Each of those supports <em>some</em> timed-interval discipline. None of them singles out this one.</p><p>The most substantial criticism is internal. The stop-at-the-bell rule directly conflicts with sustained absorption: if you are twenty-three minutes into something difficult and finally holding the whole problem in your head, a bell is an interruption you have scheduled for yourself. Practitioners who work on long analytical or creative problems commonly abandon the fixed length for that reason, and keep only the record-keeping.</p><p>If you do change the length, keep it constant. The moment a pomodoro means 25 minutes on Monday and 50 on Tuesday, the tally stops being a unit of measurement and the estimation loop — the part that produces the gains — breaks.</p><h2>Honest limits</h2><p>The technique assumes work that decomposes into uniform blocks under your own control. It fits badly with roles where it cannot: on-call and support work where the interruption <em>is</em> the job, collaborative sessions, days built from meetings, and tasks with a long warm-up before anything useful happens.</p><p>It also assumes the timer helps. For some people a countdown adds pressure rather than structure, and watching it becomes its own distraction. Others find external time structure genuinely transformative — the experience varies enough that the only test is a week of trying it.</p><p>On that point, one careful note: people with attention difficulties report both extremes, some finding a fixed external interval the single most useful support they have, others finding the forced stop destroys focus that was hard to establish. There is no general answer here and this page is not medical advice; if attention is a persistent difficulty rather than an ordinary bad week, that is worth discussing with a clinician rather than solving with a timer.</p><p>Finally, no timer addresses the common underlying problem. Task avoidance is frequently about the feeling attached to a task rather than about time management, and a twenty-five minute block does not make an unpleasant task pleasant. What it does is lower the cost of starting to twenty-five minutes, which is often enough.</p><h2>Questions people actually ask</h2><h3>What should I do if the bell rings while I am in flow?</h3><p>The orthodox answer is to stop, because the rule exists to keep you working sustainably rather than in bursts followed by collapse. The pragmatic answer is that finishing the thought and taking the break immediately after costs little. Doing it every time means you have chosen a different method, which is fine — just choose it deliberately.</p><h3>Do meetings count as pomodoros?</h3><p>No. A pomodoro is time you controlled and spent on one chosen task. Counting meetings inflates the tally and destroys its value for estimation.</p><h3>What if I am interrupted after twenty-four minutes?</h3><p>By the rules it is void. In practice, note it as void and move on without ceremony — the purpose of the rule is to make interruptions visible, not to punish you.</p><h3>Is my session data stored?</h3><p>No. The timer runs entirely in your browser, and nothing about your sessions is transmitted or saved. Closing the tab clears it.</p>"
  },
  "text-reverser": {
    "title": "Text Reverser — Characters, Words or Lines, and Why Reversing Breaks Unicode",
    "description": "Reverse characters, word order or line order, and see the four levels at which naive string reversal fails — surrogate pairs, combining accents, flag sequences and joined emoji.",
    "keywords": "reverse text online, reverse string unicode, grapheme cluster reversal, surrogate pair broken emoji, combining accent reversed, reverse word order",
    "article": "<h1>Three different operations, one word</h1><p>Reverse means at least three things, and picking the wrong one is the commonest reason the output looks nothing like what was wanted:</p><table><tr><th>Operation</th><th>Input</th><th>Output</th></tr><tr><td>Reverse characters</td><td>hello world</td><td>dlrow olleh</td></tr><tr><td>Reverse word order</td><td>hello world</td><td>world hello</td></tr><tr><td>Reverse each word in place</td><td>hello world</td><td>olleh dlrow</td></tr></table><p>Line reversal is a fourth, and it is the one with the most practical use — flipping a log file so the newest entry sits at the top.</p><h2>Character reversal is much harder than it looks</h2><p>For plain English, reversing a string is a first-week programming exercise. For real text it fails at four distinct levels, and each level produces a different flavour of wrong.</p><p><strong>Level one — storage units.</strong> Most languages store text as UTF-16, in which characters outside the basic multilingual plane occupy two units called a surrogate pair. Reversing unit by unit splits every pair and puts the halves in the wrong order. Each half is meaningless alone, so a thumbs-up emoji does not come back reversed — it comes back as two replacement boxes. The data is destroyed, not rearranged.</p><p><strong>Level two — combining marks.</strong> An accented letter can be stored as one character or as a base letter followed by a separate combining mark. Reverse the second form and the mark detaches from its letter and lands on the neighbour. The word <em>café</em>, written with a combining acute, reverses so that the accent appears over the f. Nothing errors; the text is simply wrong in a way that is easy to miss in a long string.</p><p><strong>Level three — sequences whose order is the meaning.</strong> Flag emoji are built from two regional indicator letters standing for a country code. Reversing them does not break the flag — it silently produces a <em>different valid flag</em>:</p><table><tr><th>Letters</th><th>Flag</th><th>Reversed</th><th>Becomes</th></tr><tr><td>S E</td><td>Sweden</td><td>E S</td><td>Spain</td></tr><tr><td>U A</td><td>Ukraine</td><td>A U</td><td>Australia</td></tr></table><p>This is the most instructive failure on the page, because there is no error, no replacement character and no visual clue. The output is well-formed and means something else.</p><p><strong>Level four — joined sequences.</strong> A family emoji is several person characters bound together by invisible zero-width joiners. Reversing the sequence rearranges which characters the joiners sit between, so the group either falls apart into separate figures or recomposes as a different family. Skin-tone modifiers behave the same way: the modifier must follow its base character, and reversal puts it in front of the wrong one.</p><p>Several writing systems compound the problem. In Devanagari and Thai, certain vowel signs are stored after the consonant they are pronounced before, so reversal produces sequences that cannot be rendered at all.</p><h2>How to do it correctly</h2><table><tr><th>Reverse by</th><th>Plain English</th><th>Emoji</th><th>Accents</th><th>Flags</th></tr><tr><td>Storage unit</td><td>Correct</td><td>Destroyed</td><td>Misplaced</td><td>Wrong flag</td></tr><tr><td>Code point</td><td>Correct</td><td>Scrambled</td><td>Misplaced</td><td>Wrong flag</td></tr><tr><td>Grapheme cluster</td><td>Correct</td><td>Correct</td><td>Correct</td><td>Correct</td></tr></table><p>The right unit is the <strong>grapheme cluster</strong> — what a reader would call one character. Modern browsers expose this directly through the internationalisation segmenter, which splits text into clusters that can then be reversed as a list. That single change fixes all four failure levels at once, and it is why a correct reverser and a naive one give different output on the same input.</p><h2>Right-to-left text is a separate question</h2><p>Reversing Arabic or Hebrew is not the mirror-image operation it is for English. Those scripts are stored in logical order — first letter read, first in memory — and the right-to-left display is applied at render time. So reversing the stored characters does not flip the display; it changes the text into a different, usually nonsensical, sequence. Mixed text is stranger still, because a bidirectional algorithm already reorders runs for display, and reversal interacts with it unpredictably.</p><p>That gap between stored order and displayed order has a security dimension worth knowing about defensively. Unicode includes explicit direction-override characters, and inserting one into a filename or a link can make the visible text read differently from the actual data — a file that displays as an image can be an executable. Several code-review and messaging tools now flag these characters for exactly this reason. The lesson for anyone handling untrusted strings is that what is displayed is not evidence of what is stored.</p><h2>Reversal is not obfuscation</h2><p>Worth stating flatly, because it is often suggested: <strong>reversing a password or a secret provides no protection at all.</strong> It adds zero entropy, since the transformation is public and has no key, and reversal is one of the standard rules that password-cracking software applies to every candidate in its wordlist by default. A reversed dictionary word is a dictionary word. If the aim is a strong password, the requirement is randomness, not rearrangement.</p><p>The same applies to reversed text as a way of hiding content from moderation or search — it is trivially undone, and the systems in question already handle it.</p><h2>What it is genuinely useful for</h2><ul><li>Word puzzles, ciphers and palindrome work</li><li>Flipping the order of lines in a log or an exported list</li><li>Testing whether your own software segments Unicode correctly — feed it flags and accented text and see which of the four failures appears</li><li>Checking how a layout handles unusual character sequences before real translated content arrives</li></ul><h2>Honest limits</h2><p>Character reversal is mechanical and knows nothing about language. It will not produce readable mirrored text, and it is not the same thing as upside-down text — that effect is made by substituting entirely different Unicode characters that happen to resemble inverted letters, which is a lookup table rather than a reversal.</p><p>Both reversed and substituted text carry a real accessibility cost. A screen reader announces the characters it is given, so reversed text is read as gibberish and substituted upside-down text is read as whatever those unrelated characters actually are. Neither is searchable, neither can be selected meaningfully, and neither should be used for anything a reader needs to understand — including social media names and bios, where it is most common.</p><h2>Questions people actually ask</h2><h3>Why did my emoji turn into question marks?</h3><p>The reverser worked on storage units and split a surrogate pair. Nothing can recover it from the output; reverse the original again with grapheme-cluster handling.</p><h3>Why did the accent move to a different letter?</h3><p>Because it was stored as a separate combining mark rather than as part of a precomposed character. Normalising the text to its composed form before reversing avoids this.</p><h3>Is reversed text a reasonable password trick?</h3><p>No — see above. Cracking tools apply reversal automatically, so it buys nothing.</p><h3>Is my text stored?</h3><p>No. Reversal happens in your browser and nothing you paste is transmitted or saved.</p>"
  },
  "url-encoder": {
    "title": "URL Encoder and Decoder — Percent-Encoding, %20 versus Plus, and Double Encoding",
    "description": "Encode and decode URLs correctly, with the unreserved and reserved character sets, multi-byte UTF-8 worked out, when to use whole-URL versus component encoding, and why %2520 appears.",
    "keywords": "url encoder decoder, percent encoding rfc 3986, %20 vs plus sign, double encoded url %2520, encodeuricomponent difference, punycode idn",
    "article": "<h1>What percent-encoding is</h1><p>A URL is limited to a small set of ASCII characters. Anything else is represented as a percent sign followed by the two hex digits of its byte value. The rules come from RFC 3986, which divides characters into three groups.</p><table><tr><th>Group</th><th>Characters</th><th>Treatment</th></tr><tr><td>Unreserved</td><td>A–Z, a–z, 0–9, hyphen, full stop, underscore, tilde</td><td>Never need encoding</td></tr><tr><td>Reserved</td><td>colon, slash, question mark, hash, square brackets, at sign, exclamation, dollar, ampersand, apostrophe, parentheses, asterisk, plus, comma, semicolon, equals</td><td>Structural — must be encoded when used as data</td></tr><tr><td>Everything else</td><td>Spaces, accented letters, emoji, all other scripts</td><td>Always encoded</td></tr></table><p>The reserved group is where the thinking happens. A slash separating path segments is doing its job; a slash <em>inside</em> a value is data and must become %2F, or the server will read it as a boundary.</p><h2>Multi-byte characters take several escapes</h2><p>Non-ASCII text is converted to UTF-8 first, then every byte is encoded separately. One character can therefore produce two, three or four escapes:</p><table><tr><th>Character</th><th>Code point</th><th>UTF-8 bytes</th><th>Encoded</th></tr><tr><td>Space</td><td>U+0020</td><td>20</td><td>%20</td></tr><tr><td>é</td><td>U+00E9</td><td>C3 A9</td><td>%C3%A9</td></tr><tr><td>Euro sign</td><td>U+20AC</td><td>E2 82 AC</td><td>%E2%82%AC</td></tr><tr><td>中</td><td>U+4E2D</td><td>E4 B8 AD</td><td>%E4%B8%AD</td></tr></table><p>This is why a URL containing a few words of Chinese or Arabic becomes enormously long, and it is also why encoding in the wrong character set produces mojibake rather than an error — a byte sequence from a legacy encoding is still valid percent-encoding, just meaningless as UTF-8.</p><h2>%20 or a plus sign?</h2><p>Both mean a space, in different contexts, and confusing them is the single most common URL bug.</p><table><tr><th>Context</th><th>Space becomes</th></tr><tr><td>Path segment</td><td>%20 — a plus here is a literal plus</td></tr><tr><td>Query string, form-encoded</td><td>Plus sign, historically; %20 also accepted</td></tr><tr><td>Fragment</td><td>%20</td></tr></table><p>The consequence: a literal plus in a query value <strong>must</strong> be written as %2B. Searching for the string C++ works only if it is sent as C%2B%2B — send the plus signs raw and the server receives C followed by two spaces. The same trap catches phone numbers in international format and any value that legitimately contains a plus.</p><h2>Whole URL or single component?</h2><p>Two encoding functions exist because there are two jobs, and using the wrong one is the second most common bug.</p><table><tr><th>Function</th><th>Leaves alone</th><th>Use for</th></tr><tr><td>Whole-URL encoding</td><td>All structural delimiters — slash, question mark, hash, ampersand, equals, colon</td><td>A complete URL you want made safe without breaking it</td></tr><tr><td>Component encoding</td><td>Only unreserved characters plus a handful of legacy exceptions</td><td>One value going into a path segment or query parameter</td></tr></table><p>Encode a query <em>value</em> with whole-URL encoding and any ampersand or equals sign inside it survives — which means the value silently splits into extra parameters. Where that value came from user input, this is not merely a bug, it is parameter injection.</p><p>Two footnotes. Component encoding, as implemented in browsers, does not encode the exclamation mark, apostrophe, parentheses or asterisk, although RFC 3986 treats them as reserved sub-delimiters; strict compliance requires handling those separately. And the very old escape function, still found in legacy code, emits a non-standard form for non-ASCII characters that is not valid percent-encoding at all. It should never be used.</p><h2>Double encoding, and how to recognise it</h2><p>Percent-encoding is not idempotent. The percent sign is itself a character that needs encoding, so encoding an already-encoded string transforms every %20 into %2520:</p><table><tr><th>Pass</th><th>Result</th></tr><tr><td>Original</td><td>my file.pdf</td></tr><tr><td>Encoded once</td><td>my%20file.pdf</td></tr><tr><td>Encoded twice</td><td>my%2520file.pdf</td></tr><tr><td>Encoded three times</td><td>my%252520file.pdf</td></tr></table><p>A URL littered with %25 is the signature: something encoded a value that a framework had already encoded. The fix is to find which layer is doing it and remove one, not to decode twice at the other end — decoding twice will happily decode data that was meant to stay encoded, which is a security problem in its own right.</p><h2>Position changes the rules</h2><p>The same character is treated differently depending on where it sits. A hash sign starts the fragment, and the fragment is <em>never sent to the server</em> — it exists only in the browser, so a value containing a hash must be encoded or everything after it vanishes from the request. An encoded slash inside a path segment is a notorious deployment problem: %2F is semantically distinct from a slash, but many servers and proxies normalise or reject it, so identifiers that can contain slashes are better placed in the query string or base64url-encoded.</p><p>Host names are a different system entirely. Internationalised domains are <em>not</em> percent-encoded — they are converted by Punycode into an ASCII form beginning xn--. So the same accented letter is handled one way in the host and another way three characters later in the path. This also underlies homograph attacks, where characters from another script visually imitate a familiar domain, which is why browsers display the punycode form when a name mixes scripts suspiciously.</p><h2>Honest limits — encoding is not security</h2><p>Percent-encoding makes a string safe to <em>transport</em>. It does nothing to make it safe to <em>use</em>. It does not prevent cross-site scripting, because the value is decoded before it reaches your template; it does not prevent SQL injection, which needs parameterised queries; and it does not prevent open redirects, since a fully encoded external URL decodes back to an external URL.</p><p>For input validation the ordering matters and is frequently got wrong: decode exactly once, canonicalise the result, and <em>then</em> validate. Validating before decoding is how encoded traversal sequences slip past filters, and decoding repeatedly until nothing changes reintroduces the same hole from the other direction.</p><p>Two practical constraints. The specification sets no maximum URL length, but around 2,000 characters is the safe working ceiling given older browsers, proxies and server defaults — and since encoding can triple the length of non-ASCII text, a URL that looks short can exceed it. And URLs appear in server logs, referrer headers and browser history, so sensitive values belong in a request body, not in a query string, regardless of how well they are encoded.</p><h2>Questions people actually ask</h2><h3>Should I encode the whole URL or just the parameter?</h3><p>Just the parameter, in almost every case. Encode each value as you build the URL; never encode a URL you have already assembled unless you intend the delimiters to survive.</p><h3>Why does my URL contain %2520?</h3><p>Double encoding. Something encoded a string that was already encoded — remove one of the two passes rather than decoding twice.</p><h3>My plus sign disappeared. Why?</h3><p>It was read as a space in the query string. Send it as %2B.</p><h3>Is my URL stored?</h3><p>No. Encoding and decoding run in your browser, and nothing you paste is transmitted, logged or saved.</p>"
  },
  "uuid-generator": {
    "title": "UUID Generator — 122 Random Bits, Version 7, and the Primary-Key Problem",
    "description": "Generate version 4 UUIDs, with the bit layout explained, honest collision figures, why bad entropy causes real duplicates, and why random UUIDs make poor clustered primary keys.",
    "keywords": "uuid generator, uuid v4 collision probability, uuid v7 time ordered, uuid primary key performance, rfc 9562, guid byte order",
    "article": "<h1>Inside a UUID: Structure, Collisions, and Why Version 4 Dominates</h1><p>A UUID is 128 bits, written as 32 hexadecimal digits in five hyphen-separated groups of 8-4-4-4-12. But not all 128 bits are free. Two fields are fixed by the specification:</p><table><tr><th>Field</th><th>Position</th><th>Value in version 4</th></tr><tr><td>Version</td><td>First digit of the third group</td><td>Always 4</td></tr><tr><td>Variant</td><td>First digit of the fourth group</td><td>Always 8, 9, a or b</td></tr></table><p>Four bits of version plus two bits of variant leaves <strong>122 random bits</strong>, not 128. That is why every version 4 UUID you generate has a 4 in the same place — a useful sanity check when debugging, and a reminder that a UUID is a structured value rather than a random blob.</p><h2>The collision numbers, stated honestly</h2><p>Collision risk follows the birthday problem, approximately <code>n² ÷ (2 × 2^122)</code>:</p><table><tr><th>UUIDs generated</th><th>Probability of any collision</th></tr><tr><td>1 billion</td><td>about 1 in 10^19</td></tr><tr><td>1 trillion</td><td>about 1 in 10^13</td></tr><tr><td>1 quadrillion</td><td>about 1 in 10 million</td></tr><tr><td>2.3 × 10^18</td><td>about 50%</td></tr></table><p>Put in the usual way: generating a billion UUIDs every second for around 85 years gets you to roughly even odds of a single duplicate. For any real application the random-chance risk is not worth modelling.</p><p><strong>But that arithmetic has a precondition, and it is where real collisions come from.</strong> It assumes 122 bits of genuinely unpredictable randomness. When duplicate UUIDs do turn up in production — and they do — the cause is almost never the birthday bound. It is entropy:</p><ul><li>A generator built on an ordinary pseudo-random function rather than a cryptographic one, so the sequence is predictable and two processes started together produce the same stream</li><li>Containers launched from an identical image, or virtual machines restored from the same snapshot, inheriting the same seed state</li><li>Embedded devices generating identifiers at boot before any entropy has been gathered</li></ul><p>Browsers now expose a correct implementation directly, and using it removes the question. If you are generating UUIDs anywhere else, the thing worth checking is the random source, not the collision maths.</p><h2>The versions, and what each is for</h2><table><tr><th>Version</th><th>Built from</th><th>Property</th></tr><tr><td>1</td><td>Timestamp plus network card address</td><td>Time-ordered but leaks the machine and creation time</td></tr><tr><td>3 and 5</td><td>Hash of a namespace plus a name</td><td>Deterministic — same input always gives the same UUID</td></tr><tr><td>4</td><td>Random</td><td>Unguessable, unordered</td></tr><tr><td>7</td><td>Millisecond timestamp plus random</td><td>Unguessable in its tail and sortable by creation time</td></tr></table><p>Version 1 carries a genuine privacy cost that is easy to overlook: the identifier embeds the hardware address of the machine that made it, along with the moment it was made. This is not theoretical — it was famously used in 1999 to trace the author of the Melissa virus through identifiers embedded in the documents. Version 1 UUIDs in a public API leak infrastructure details.</p><p>Versions 3 and 5 are underused. Because they are deterministic, hashing a namespace and a stable name produces the same UUID every time, which gives you idempotent identifiers without a lookup table — useful for de-duplicating imports where the source has a natural key but no identifier.</p><p>Versions 6, 7 and 8 were standardised in RFC 9562, which replaced the older RFC 4122. Version 7 is the one most projects now want, for the reason in the next section.</p><h2>Why random UUIDs make bad primary keys</h2><p>The old advice — that UUIDs are unique so you can safely use them as primary keys — is true about uniqueness and misleading about consequences.</p><p>A database index is a tree kept in sorted order. Sequential integers append to the end of it, touching one page repeatedly, which stays in memory. Random UUIDs insert at random positions, so every insert touches a different page:</p><table><tr><th>Effect</th><th>Sequential key</th><th>Random UUID key</th></tr><tr><td>Pages touched per insert</td><td>Usually one, hot in cache</td><td>A different one each time</td></tr><tr><td>Page splits</td><td>Rare</td><td>Frequent</td></tr><tr><td>Index fragmentation</td><td>Low</td><td>High</td></tr><tr><td>Working set to stay fast</td><td>Small</td><td>Approaches the whole index</td></tr></table><p>On low insert volumes this does not matter. On high-volume tables it produces exactly the kind of slowdown that appears months after launch and is hard to attribute.</p><p>Storage compounds it. A UUID is 16 bytes as binary. Stored as a 36-character text column — an extremely common mistake — it becomes 36 or 37 bytes, and that inflation is repeated in every secondary index and every foreign key referencing it:</p><table><tr><th>Representation</th><th>Bytes</th></tr><tr><td>32-bit integer</td><td>4</td></tr><tr><td>64-bit integer</td><td>8</td></tr><tr><td>UUID as binary</td><td>16</td></tr><tr><td>UUID as fixed-length text</td><td>36</td></tr></table><p>The fixes, in order of preference: use version 7 so identifiers are time-ordered and insert near the end of the index; store as the native UUID type or as 16 raw bytes rather than text; or keep a monotonic internal key for clustering and expose the UUID as a separate indexed column. Version 7 solves most of this with a one-line change and keeps the useful property that identifiers can be generated by the client without a round trip.</p><h2>A UUID is not a secret</h2><p>Version 4 UUIDs are unguessable, which tempts people into using them as bearer tokens — the unlisted link, the password-reset URL, the invitation. That works up to a point, and the point is worth knowing.</p><p>An identifier in a URL appears in server logs, in referrer headers sent to third parties, in browser history, in shared screenshots and in link previews generated by chat applications. It does not expire on its own, it cannot be scoped, and revoking it means invalidating the resource. For anything short-lived and low-value that is an acceptable trade; for account recovery it is not, and such tokens should be separately generated, hashed at rest, scoped and given a short expiry.</p><p>Version 1 and version 7 UUIDs are additionally <em>partly</em> predictable, since the timestamp portion is known, so neither should ever be used as a capability token.</p><h2>Honest limits and interoperability notes</h2><p>UUIDs are canonically lowercase but comparison is case-insensitive, so a system that compares them as raw strings will fail against a source that emits uppercase. Microsoft-style GUIDs are often uppercase and sometimes wrapped in braces, both of which must be normalised away.</p><p>There is also a byte-order trap. The Microsoft binary representation stores the first three fields in little-endian order, while the specification defines them big-endian. The same GUID therefore has two different byte layouts, and moving binary values between a .NET system and a standards-compliant one without conversion produces identifiers that look scrambled — a real and frequently painful interop bug.</p><p>Finally, they are not human-friendly. Thirty-six characters cannot be read over a phone, quoted in a support ticket reliably, or typed without error. Where a person has to handle the identifier, a short human-readable code alongside the UUID is worth the extra column.</p><h2>Questions people actually ask</h2><h3>Could I really never see a duplicate?</h3><p>From chance alone, effectively never. From a broken random source, quite easily — which is the risk actually worth guarding against.</p><h3>Version 4 or version 7?</h3><p>Version 7 for database identifiers, because of the index behaviour above. Version 4 where ordering would leak information you would rather not disclose, such as signup sequence or volume.</p><h3>Is a UUID enough to protect a private link?</h3><p>Only for low-value, short-lived things. It is unguessable but it is not confidential, because URLs travel further than people expect.</p><h3>Are the UUIDs generated here recorded?</h3><p>No. They are produced by your browser cryptographic random source and nothing is transmitted, logged or stored. Copy what you need before closing the page.</p>"
  },
  "case-converter": {
    "title": "Case Converter — Title Case Rules, Programmer Cases, and the Turkish i Problem",
    "description": "Convert text between upper, lower, sentence, title, camel, snake and kebab case, with the style-guide disagreements, the lossy conversions, and the locale bugs that break naive case changes.",
    "keywords": "case converter, title case rules chicago ap, camel case to snake case, turkish dotless i bug, german eszett uppercase, unicode case folding",
    "article": "<h1>The four everyday cases, and why two of them are hard</h1><table><tr><th>Case</th><th>Example</th><th>Difficulty</th></tr><tr><td>UPPERCASE</td><td>THE ANNUAL REPORT IS LATE</td><td>Mostly mechanical</td></tr><tr><td>lowercase</td><td>the annual report is late</td><td>Mechanical, but destroys information</td></tr><tr><td>Sentence case</td><td>The annual report is late</td><td>Needs sentence detection</td></tr><tr><td>Title Case</td><td>The Annual Report Is Late</td><td>Needs a style guide and a word list</td></tr></table><p>Upper and lower look trivial and are, until non-English text arrives — see the locale section below. The other two involve judgement, and any tool that claims to do them perfectly is overselling.</p><p>Lowercasing is <strong>lossy in a way that cannot be undone</strong>. Once <em>Paris</em> becomes <em>paris</em>, nothing in the text records that it was a proper noun. Sentence case applied to a document typed with caps lock on will fix the shouting and simultaneously flatten every name, brand and initialism in it. That is the single most common disappointment with this kind of conversion, and it is worth knowing before you convert several thousand words rather than after.</p><h2>Title case: the style guides genuinely disagree</h2><p>There is no single correct title case. Every guide capitalises the first and last word and all major words, and they differ on the small ones:</p><table><tr><th>Guide</th><th>Rule for prepositions</th><th>Result</th></tr><tr><td>Chicago</td><td>Lowercase regardless of length</td><td>Look into the Future</td></tr><tr><td>Associated Press</td><td>Capitalise if four letters or more</td><td>Look Into the Future</td></tr><tr><td>APA</td><td>Capitalise if four letters or more</td><td>Look Into the Future</td></tr></table><p>So a converter has to pick a side. Beyond that, the cases where automatic title casing reliably fails:</p><ul><li><strong>Initialisms</strong> — NASA and API become Nasa and Api unless the tool knows to leave existing all-capital words alone</li><li><strong>Names with internal capitals</strong> — McDonald, O Brien, iPhone, eBay, LaTeX all get mangled by a capitalise-first-letter-lowercase-the-rest rule</li><li><strong>Hyphenated compounds</strong> — guides differ on whether the second element is capitalised, and a tool cannot tell a compound adjective from a prefix</li><li><strong>Roman numerals</strong> — Part III becomes Part Iii</li><li><strong>After a colon</strong> — most guides capitalise the first word of a subtitle even if it is an article</li></ul><p>Sentence case has its own trap: sentence boundaries are not full stops. Abbreviations such as Dr. and e.g., decimal numbers such as 3.5, and version strings such as 2.1.4 all produce false boundaries, so a naive splitter capitalises mid-sentence.</p><h2>Programmer cases and the acronym problem</h2><table><tr><th>Name</th><th>Form</th><th>Typical use</th></tr><tr><td>camelCase</td><td>parseUserInput</td><td>Variables in Java, JavaScript</td></tr><tr><td>PascalCase</td><td>ParseUserInput</td><td>Types and classes</td></tr><tr><td>snake_case</td><td>parse_user_input</td><td>Python, SQL columns</td></tr><tr><td>SCREAMING_SNAKE</td><td>PARSE_USER_INPUT</td><td>Constants, environment variables</td></tr><tr><td>kebab-case</td><td>parse-user-input</td><td>URLs, CSS, command flags</td></tr></table><p>Converting between them looks like a one-line job and is not, because splitting camel case requires deciding where a run of capitals ends. Take <code>parseHTTPResponse</code>. Splitting on every capital gives <em>parse_h_t_t_p_response</em>, which is wrong. Treating a run of capitals as one word gives <em>parse_httpresponse</em>, which is also wrong. The usual rule — a run of capitals is one word, except that its last letter belongs to the following word if a lowercase letter follows — gives <em>parse_http_response</em>, which is right here.</p><p>But that rule cannot always be right, because the information is genuinely absent. <code>HTTPSConnection</code> could be HTTPS plus Connection or HTTP plus SConnection, and no algorithm can tell without a dictionary. Round-tripping identifiers through case conversions is therefore not guaranteed to return the original, which matters if you are generating code or migrating a schema.</p><h2>Where uppercase and lowercase actually break</h2><p>Case is not a per-character property in every language, and this produces real bugs.</p><p><strong>Turkish and Azerbaijani.</strong> These languages have two distinct letter i: dotless ı and dotted i, with separate capitals I and İ. In a Turkish locale, uppercasing i correctly yields İ, and lowercasing I correctly yields ı. A locale-aware case conversion applied to English text inside a Turkish locale therefore turns <em>file</em> into <em>FİLE</em>, and a lowercase comparison of <em>FILE</em> returns <em>fıle</em>, which matches nothing. This has broken configuration parsing, command handling and authentication checks in shipped software many times. The lesson is narrow and useful: never use a locale-sensitive case conversion for comparing machine-readable strings such as keys, tags, protocol tokens or file extensions.</p><p><strong>German.</strong> The letter ß has historically uppercased to SS, so <em>straße</em> becomes <em>STRASSE</em> and lowercasing that gives <em>strasse</em> — a round trip that silently changes the word. A capital form ẞ exists and was admitted as an official alternative in 2017, but most software still expands to SS.</p><p><strong>Greek.</strong> Lowercase sigma has two forms: ς at the end of a word and σ elsewhere. Lowercasing Greek capitals correctly requires knowing where words end, so it is context-sensitive rather than character-by-character.</p><p>A related point: some characters change <em>length</em> when case is changed. One ß becomes two letters. Any code that assumes an uppercased string has the same length as its input, or that character positions line up before and after, is wrong for these inputs.</p><h2>Case folding, not lowercasing, for comparison</h2><p>If your goal is to compare two strings ignoring case, lowercasing both is the intuitive approach and the wrong one. Unicode defines <em>case folding</em> for exactly this purpose: it is locale-independent, it folds ß to ss so the German pair compares equal, and it normalises the two sigmas.</p><p>This matters most for usernames and identifiers, where case-insensitive matching decides whether two accounts are the same account. Some characters fold together that do not look alike — the Kelvin sign folds to a plain k, and several mathematical and compatibility letters fold to ordinary Latin ones. Normalising registration input with folding <em>plus</em> Unicode normalisation, and rejecting mixed scripts, is the standard defence against lookalike account collisions.</p><h2>Display versus data</h2><p>If you only want text to <em>look</em> uppercase on a web page, a stylesheet text transform is the better tool: the underlying content is unchanged, so copying the text yields the original wording, translators see real sentences, and you can change your mind without re-editing content. Converting the characters themselves is for when the stored value must change.</p><p>Two accessibility notes on all capitals. Screen readers may read a run of capitals letter by letter when it looks like an initialism, so a whole heading in capitals can be announced as individual letters. And research on continuous reading, going back to Miles Tinker legibility studies, has consistently found all-capital text slower to read than mixed case — roughly ten percent — because the distinct outline shape of words is lost. Capitals are fine for short labels and poor for sentences.</p><p>For search: capitalisation is not a ranking factor, and search engines fold case when matching queries. Titles are shown as written, so a heading in shouting capitals affects click-through rather than position.</p><h2>Questions people actually ask</h2><h3>Which title case setting is correct?</h3><p>Whichever your publication uses. If you have no house style, pick one and stay consistent — inconsistency across headings is more visible to a reader than either convention.</p><h3>Why did uppercasing break my non-English text?</h3><p>Almost certainly a locale-sensitive conversion applied to data. Use a locale-independent conversion for machine-readable strings and a locale-aware one only for text a person will read in that language.</p><h3>Can I recover proper nouns after lowercasing everything?</h3><p>Not reliably. The capitals carried the information and it is gone. Keep the original until you have checked the result.</p><h3>Is my text sent anywhere?</h3><p>No. The conversion runs entirely in your browser. Nothing is uploaded, logged or stored, which is the reason this is safe to use on unpublished or confidential copy.</p>"
  },
  "roman-numerals": {
    "title": "Roman Numeral Converter — The Rules, the Valid Forms, and What the System Cannot Do",
    "description": "Convert numbers to Roman numerals and back, with the thirteen-pair algorithm, worked conversions, which forms are invalid, and why clock faces still show IIII.",
    "keywords": "roman numeral converter, roman numeral rules, why clocks use IIII, roman numerals above 3999, invalid roman numerals IL IC, MMXXVI",
    "article": "<h1>Seven symbols and two rules</h1><table><tr><th>Symbol</th><th>Value</th></tr><tr><td>I</td><td>1</td></tr><tr><td>V</td><td>5</td></tr><tr><td>X</td><td>10</td></tr><tr><td>L</td><td>50</td></tr><tr><td>C</td><td>100</td></tr><tr><td>D</td><td>500</td></tr><tr><td>M</td><td>1000</td></tr></table><p>The additive rule: symbols in descending order are added, so LXVII is 50 plus 10 plus 5 plus 1 plus 1, or 67. The subtractive rule: a smaller symbol placed before a larger one is subtracted, so IX is 9 and CD is 400.</p><p>The subtractive rule is tightly constrained, and this is where most hand-written numerals go wrong. Only I, X and C may be subtracted, and each only from the next two values up:</p><table><tr><th>May precede</th><th>Valid</th><th>Invalid</th></tr><tr><td>I before V and X</td><td>IV, IX</td><td>IL, IC, ID, IM</td></tr><tr><td>X before L and C</td><td>XL, XC</td><td>XD, XM</td></tr><tr><td>C before D and M</td><td>CD, CM</td><td>—</td></tr><tr><td>V, L, D</td><td>never subtracted</td><td>VX, LC, DM</td></tr></table><p>Two further constraints: I, X, C and M may repeat at most three times, and V, L and D never repeat at all. So 1999 is <strong>MCMXCIX</strong>, not MIM — a form that appears constantly and is not valid, because I cannot be subtracted from M.</p><h2>How the conversion actually works</h2><p>Every standard converter uses the same table of thirteen value-and-symbol pairs, taken largest first, subtracting as many times as each fits:</p><table><tr><th>Value</th><th>Symbol</th><th>Value</th><th>Symbol</th></tr><tr><td>1000</td><td>M</td><td>40</td><td>XL</td></tr><tr><td>900</td><td>CM</td><td>10</td><td>X</td></tr><tr><td>500</td><td>D</td><td>9</td><td>IX</td></tr><tr><td>400</td><td>CD</td><td>5</td><td>V</td></tr><tr><td>100</td><td>C</td><td>4</td><td>IV</td></tr><tr><td>90</td><td>XC</td><td>1</td><td>I</td></tr><tr><td>50</td><td>L</td><td>&nbsp;</td><td>&nbsp;</td></tr></table><p>Including the four subtractive pairs in the table is what makes the greedy approach produce valid output automatically — there is no separate step that decides when to subtract.</p><p><strong>Worked example, 2026.</strong> Take 1000 twice, leaving 26. Take 10 twice, leaving 6. Take 5, leaving 1. Take 1. Result <strong>MMXXVI</strong>, and checking backwards: 1000 plus 1000 plus 10 plus 10 plus 5 plus 1 is 2026.</p><p><strong>Worked example, 1994.</strong> Take 1000, leaving 994. Nine hundred fits, so CM, leaving 94. Ninety fits, so XC, leaving 4. Four fits, so IV. Result <strong>MCMXCIV</strong>, which reads as 1000 plus 900 plus 90 plus 4.</p><p>Reading in the other direction is a single pass: add each symbol value, but subtract instead of adding whenever the current symbol is smaller than the one after it.</p><h2>Why clock faces show IIII</h2><p>Strict subtractive notation is a later standardisation, not classical practice. Roman inscriptions and manuscripts use IIII and XXXX freely alongside IV and XL, and the choice was often a matter of the space available or the mason preference. The tidy rule set above was settled long after Rome.</p><p>Clock dials preserve the older habit, and IIII rather than IV is still the overwhelming convention on traditional dials. Several explanations circulate — visual balance against the VIII opposite it, avoiding a resemblance to the initials of the Roman god Jupiter, easier casting of moulds when the numerals are struck rather than engraved — and none of them is documented well enough to state as fact. What is safe to say is that IIII on a clock is not an error, and that a converter which only ever emits IV is following a modern convention rather than a historical one.</p><h2>What the system cannot represent</h2><p><strong>There is no zero.</strong> The seven symbols have no way to write nothing, which is not a gap in the notation so much as a difference in what it is for: it is a tally-derived system for recording quantities, not a positional system for calculating with them. Medieval computists working out Easter dates simply wrote the word for nothing, and the letter N stood in for zero in Bede calendrical tables in the eighth century.</p><p><strong>There is no place value.</strong> Written arithmetic in Roman numerals is awkward, which is why Romans did not do it that way — calculation happened on a counting board or abacus and only the result was written down. The frequent claim that Roman numerals held back mathematics for centuries overstates it; the counting board handled the arithmetic perfectly well.</p><p><strong>There are no fractions in the seven symbols.</strong> Romans used a separate duodecimal scheme for parts, with S for a half and dots for twelfths — unrelated to the letters and not supported by any modern converter.</p><p><strong>There is a ceiling at 3999.</strong> With three M at most, the largest expressible number is MMMCMXCIX. Above that, historical practice used a vinculum — an overline multiplying a numeral by a thousand — or the older bracketing notation. Neither is well supported in plain text, so most tools, including this one, stop at 3999 rather than inventing a form.</p><h2>Practical notes for people using them today</h2><p>Roman numerals survive in clock dials, film and broadcast copyright lines, the front matter of printed books, regnal and papal numbers, chemical oxidation states, and chord analysis in music theory. The American football championship used them continuously until the fiftieth game in 2016, which was branded with an Arabic 50 because L on its own looked wrong, and then reverted to LI the following year — a good illustration of the system being a typographic choice rather than a numeric one.</p><p>Three things worth knowing if numerals end up in software:</p><ul><li><strong>They do not sort.</strong> Alphabetically, IX comes before V, and XL comes before XLI but also before XV. Sorting a list of Roman numerals as text produces an order unrelated to their values, so store the number and render the numeral.</li><li><strong>Lenient parsers accept nonsense.</strong> A simple add-and-subtract reader happily returns 49 for IL and 4 for IIII, and something for IXIX. If input validity matters, validate against the constraints above rather than relying on the parser not to crash.</li><li><strong>Unicode has lookalike characters.</strong> There are precomposed Roman numeral code points that display as Ⅰ, Ⅱ and Ⅲ but are not the letters I and V. Text containing them will not match a search for the letter forms, and comparisons fail silently. Convert them to plain letters on input.</li></ul><p>Two pieces of trivia that are actually verifiable: the longest year written in Roman numerals in the modern era was 1888, thirteen characters as MDCCCLXXXVIII, and the longest number below four thousand is 3888 at fifteen characters, MMMDCCCLXXXVIII.</p><h2>Questions people actually ask</h2><h3>Is IIII wrong?</h3><p>Not historically, and not on a clock. In modern prose and for anything a style guide governs, use IV.</p><h3>Why does my numeral not match another converter?</h3><p>Usually because one of them permits non-standard subtractive forms. MCMXCIX and MIM look like alternatives for 1999 but only the first is valid, and a lenient tool may produce or accept the second.</p><h3>How do I write a number above 3999?</h3><p>There is no plain-text standard. An overline multiplying by a thousand is the historical answer, but it needs typography rather than characters, which is why most converters stop.</p><h3>Is anything I convert here recorded?</h3><p>No. The conversion runs in your browser and nothing is sent to a server, logged or stored.</p>"
  },
  "percentage-calculator": {
    "title": "Percentage Calculator — Four Formulas, and the Mistakes That Cost Real Money",
    "description": "Work out a percentage of a number, percentage change, and reverse percentages, with worked figures and the traps: percentage points, stacked discounts, margin versus markup and asymmetric recovery.",
    "keywords": "percentage calculator, percentage change formula, percentage points vs percent, stacked discount calculation, margin vs markup, reverse percentage vat",
    "article": "<h1>Four questions, four formulas</h1><p>Nearly every percentage problem is one of these, and the mistakes almost always come from solving the wrong one:</p><table><tr><th>Question</th><th>Formula</th><th>Example</th></tr><tr><td>What is P% of N?</td><td><code>N × P ÷ 100</code></td><td>20% of 50 is 10</td></tr><tr><td>X is what percent of Y?</td><td><code>X ÷ Y × 100</code></td><td>37 of 240 is 15.42%</td></tr><tr><td>Change from A to B?</td><td><code>(B − A) ÷ A × 100</code></td><td>180 to 234 is +30%</td></tr><tr><td>N is P% of what?</td><td><code>N ÷ (P ÷ 100)</code></td><td>96 is 120% of 80</td></tr></table><p>The fourth is the one people get wrong most often, and it has a name: the reverse percentage. If a price of 96 includes 20% tax, the tax is <strong>not</strong> 20% of 96. Dividing gives the base: <code>96 ÷ 1.20 = 80</code>, so the tax is 16. Taking 20% of the gross instead gives 19.20 and a base of 76.80, which is wrong by 3.20 on every line of an invoice.</p><h2>Increases and decreases are not symmetric</h2><p>A 50% fall followed by a 50% rise does not get you back. Starting at 100: down 50% is 50, up 50% is 75. The reason is that the second percentage applies to a smaller base. The gain needed to undo a loss is <code>d ÷ (1 − d)</code>:</p><table><tr><th>Fall</th><th>Rise needed to recover</th></tr><tr><td>10%</td><td>11.1%</td></tr><tr><td>20%</td><td>25%</td></tr><tr><td>25%</td><td>33.3%</td></tr><tr><td>50%</td><td>100%</td></tr><tr><td>80%</td><td>400%</td></tr></table><p>This is why a portfolio down 30% and then up 30% is at 91, and why a metric described as having recovered its percentage drop usually has not.</p><h2>Stacked discounts do not add</h2><p>Twenty percent off, then a further ten percent off, is not thirty percent off. The multipliers combine: <code>0.80 × 0.90 = 0.72</code>, so the total discount is <strong>28%</strong>.</p><table><tr><th>Two discounts</th><th>Sum (wrong)</th><th>Actual</th></tr><tr><td>20% then 10%</td><td>30%</td><td>28%</td></tr><tr><td>30% then 20%</td><td>50%</td><td>44%</td></tr><tr><td>25% then 25%</td><td>50%</td><td>43.75%</td></tr><tr><td>50% then 50%</td><td>100%</td><td>75%</td></tr></table><p>The same arithmetic settles a question shoppers argue about: whether a discount should be applied before or after tax. Since both are multiplications, the order does not change the total. A 100 item with 10% off and 8% tax comes to 97.20 either way — <code>90 × 1.08</code> and <code>108 × 0.90</code> are the same number. Order <em>does</em> matter when one of them is a fixed amount rather than a percentage, and some jurisdictions specify which base tax applies to, so a receipt can differ from your arithmetic for legal rather than mathematical reasons.</p><h2>Margin and markup are different numbers</h2><p>This one has real consequences for anyone pricing goods. Buy for 60, sell for 100. The profit is 40. Divided by the selling price that is a <strong>40% margin</strong>; divided by the cost it is a <strong>66.7% markup</strong>. Same transaction, two numbers, and quoting one when you mean the other underprices the product.</p><table><tr><th>Margin</th><th>Equivalent markup</th></tr><tr><td>10%</td><td>11.1%</td></tr><tr><td>20%</td><td>25%</td></tr><tr><td>30%</td><td>42.9%</td></tr><tr><td>40%</td><td>66.7%</td></tr><tr><td>50%</td><td>100%</td></tr></table><p>To convert, <code>markup = margin ÷ (1 − margin)</code>. Applying a 30% markup when you wanted a 30% margin leaves you with a 23% margin, which on thin-margin goods is most of the profit.</p><h2>Percent and percentage point are not the same word</h2><p>If an interest rate moves from 4% to 6%, that is a rise of <strong>two percentage points</strong> and also a rise of <strong>fifty percent</strong>. Both are correct and they describe the same event with numbers that differ by a factor of twenty-five.</p><p>This is the single most exploited ambiguity in reporting about rates — conversion rates, tax rates, interest rates, unemployment, poll shares. When a claim about a rate uses the word percent without saying which, the figure is uninterpretable, and the more impressive-sounding version is usually the one chosen. If you are writing the number, say percentage points when that is what you mean.</p><h2>Growth rates compound, and averages of percentages usually lie</h2><p>Ten percent growth per month for a year is not 120% growth. It is <code>1.10^12 = 3.138</code>, or <strong>+213.8%</strong>. Conversely, going from 100 to 180 over five years is not 16% a year; the annualised rate is <code>1.8^(1/5) − 1 = 12.47%</code>, and checking it forwards, 1.1247 to the fifth power returns 1.80.</p><p>Averaging percentages is valid only when the bases are equal. Consider two shops: one converts 2 of 10 visitors, the other 30 of 1,000. The average of 20% and 3% is 11.5%. The actual combined rate is <code>32 ÷ 1,010 = 3.17%</code>. Always recombine the raw counts and divide once; averaging the rates weights a tiny sample equally with a large one.</p><h2>Where percentages mislead</h2><ul><li><strong>Undefined bases.</strong> Percentage change from zero is undefined, and from a negative number it is meaningless. A move from a loss of 50 to a profit of 25 is not an improvement of 150% — it needs describing in absolute terms.</li><li><strong>Relative without absolute.</strong> A risk that doubles sounds alarming and may be a move from 0.01% to 0.02%. Any relative figure quoted without the underlying rate is uninformative, and health and safety claims are where this happens most.</li><li><strong>Rounding that does not sum.</strong> Three equal shares round to 33.3% each and total 99.9%. Forcing the display to 100% requires deliberately adjusting the largest remainder, and a table that sums to 100.1% is usually honest rounding rather than an error.</li><li><strong>Small denominators.</strong> A move from 1 to 2 support tickets is a 100% increase. True, and not worth reporting.</li></ul><p>Percentages of very small samples, of changing populations, or of figures that were themselves estimates carry all the uncertainty of their inputs without showing it. Keeping the raw numbers next to the percentage is the cheapest defence.</p><h2>Questions people actually ask</h2><h3>How do I take tax off a price that already includes it?</h3><p>Divide by one plus the rate. For 20%, divide the gross by 1.2 to get the net; the difference is the tax. Do not multiply the gross by the rate.</p><h3>Two discounts of 25% each — is that half price?</h3><p>No, 43.75% off. Multiply 0.75 by 0.75 to get the remaining share of 0.5625.</p><h3>My supplier quotes a 40% markup and I want a 40% margin. What price?</h3><p>Divide the cost by 0.60, not multiply by 1.40. On a cost of 60 that is 100 rather than 84.</p><h3>Is anything I enter here sent to a server?</h3><p>No. Every calculation runs in your browser, and nothing is transmitted, logged or stored — which is why this is safe for pricing and salary figures you would rather not paste into an online form.</p>"
  },
  "time-zone-converter": {
    "title": "Time Zone Converter — Why Meetings Drift, and What a Converter Cannot Know",
    "description": "Convert times between zones, with the overlap arithmetic for real working hours, the three weeks each year when offsets change, and an honest account of the limits of any time zone data.",
    "keywords": "time zone converter, meeting planner across time zones, dst transition dates differ, working hours overlap calculator, iana time zone database, est vs edt",
    "article": "<h1>The world is twenty-six hours wide</h1><p>Offsets run from UTC−12 to UTC+14, a span of 26 hours. One consequence is that for about two hours of every day, <strong>three different calendar dates are in use somewhere on Earth at the same instant</strong> — which is why a date on its own is not a time, and why an unqualified deadline of Friday can be a day and a half wide.</p><p>Not every offset is a whole hour, either:</p><table><tr><th>Offset</th><th>Where</th></tr><tr><td>UTC+5:30</td><td>India, Sri Lanka</td></tr><tr><td>UTC+5:45</td><td>Nepal</td></tr><tr><td>UTC+3:30</td><td>Iran</td></tr><tr><td>UTC+9:30</td><td>Central Australia</td></tr><tr><td>UTC+12:45</td><td>Chatham Islands</td></tr><tr><td>UTC−3:30</td><td>Newfoundland</td></tr></table><p>Any scheduling logic that assumes offsets are whole hours breaks on roughly a fifth of the world population, most of it in South Asia.</p><h2>The three weeks a year your recurring meeting moves</h2><p>Daylight saving changes are not synchronised. The European Union switches on the last Sunday in March and the last Sunday in October. The United States switches on the second Sunday in March and the first Sunday in November. In the gaps:</p><ul><li><strong>Mid-to-late March, about three weeks.</strong> New York has moved forward, London has not. The usual five-hour gap is temporarily <strong>four</strong>.</li><li><strong>Late October to early November, about one week.</strong> London has moved back, New York has not. Again <strong>four</strong> hours instead of five.</li></ul><p>A standing call at 14:00 London and 09:00 New York cannot hold both of those times through those weeks. One side moves, and which side moves is whatever the calendar software decided when the invitation was created. This is the single most common cause of somebody joining an hour early, and it is not a bug in anyone tool — it is two governments choosing different Sundays.</p><p>Across the equator it is larger. London to Sydney ranges from <strong>nine to eleven hours</strong> over the year, because the two hemispheres shift in opposite directions and their transition dates do not line up. There is no single correct answer to how far ahead Sydney is.</p><p>Within a single country it can vary too. Queensland and Western Australia do not observe daylight saving while New South Wales and Victoria do, so Sydney and Brisbane share a clock for half the year and are an hour apart for the other half. Arizona does not observe it, but the Navajo Nation inside Arizona does, and the Hopi Reservation inside the Navajo Nation does not — so a short drive can cross the same boundary three times.</p><h2>Working-hour overlap, which is the number you actually need</h2><p>Knowing the offset is less useful than knowing how much of the day both parties are awake for. Taking a 09:00 to 17:00 day on both sides, from London in summer:</p><table><tr><th>With</th><th>Gap</th><th>Shared working hours</th></tr><tr><td>Berlin</td><td>1 hour</td><td>7 hours</td></tr><tr><td>Delhi</td><td>4.5 hours</td><td>3.5 hours</td></tr><tr><td>New York</td><td>5 hours</td><td>3 hours</td></tr><tr><td>San Francisco</td><td>8 hours</td><td>none</td></tr><tr><td>Sydney</td><td>9 to 11 hours</td><td>none</td></tr></table><p>The San Francisco and Sydney rows are the honest answer to a question people keep asking a converter to solve: there is no time that suits both. Something has to give, and the choices are a standing early or late slot, rotating which side absorbs it, or making the work asynchronous. A converter can tell you what 08:00 in one city is in another; it cannot make an overlap exist.</p><h2>Never write EST when you mean Eastern</h2><p>Time zone abbreviations are not unique, and several are actively contradictory:</p><table><tr><th>Abbreviation</th><th>Could mean</th></tr><tr><td>CST</td><td>US Central (UTC−6), China (UTC+8), Cuba (UTC−5)</td></tr><tr><td>IST</td><td>India (UTC+5:30), Ireland (UTC+1), Israel (UTC+2)</td></tr><tr><td>BST</td><td>British Summer (UTC+1), Bangladesh (UTC+6)</td></tr><tr><td>AMT</td><td>Amazon (UTC−4), Armenia (UTC+4)</td></tr></table><p>There is a second, quieter error: EST means Eastern <em>Standard</em> Time, which New York is not on in July — it is on EDT. Writing 15:00 EST for a July call names a time that does not currently exist there. Most people read it as Eastern and get it right anyway, but automated parsers do not.</p><p>The unambiguous forms are the offset (<code>15:00 UTC+01:00</code>), the full ISO timestamp with offset, or the IANA zone identifier such as <code>Europe/London</code> or <code>America/New_York</code>. Zone identifiers are the right choice because they carry the whole history and future ruleset, not one moment of it.</p><h2>What a converter genuinely cannot know</h2><p>The claim that a tool handles all daylight saving rules and always returns the mathematically correct local time deserves qualifying, because it is only true of the past.</p><p>Zone rules come from the IANA time zone database, which publishes several revisions a year, and your browser knows only the version bundled with it. Converting a date in the future is therefore a <strong>prediction</strong> that the current rules will still apply. Governments change them, often with weeks of notice:</p><ul><li>Turkey stopped switching and stayed permanently on UTC+3 in 2016</li><li>Samoa moved across the date line in 2011 and 30 December simply did not happen there</li><li>Mexico ended daylight saving across most of the country in 2022</li><li>Iran abolished its daylight saving in 2022</li><li>Egypt reintroduced daylight saving in 2023 after nearly a decade without it</li></ul><p>Two further genuine gaps. On the spring transition an hour of local time <strong>does not exist</strong> — a 02:30 alarm has no instant to fire at — and on the autumn transition an hour <strong>happens twice</strong>, so a local timestamp of 01:30 is ambiguous without an offset. Scheduled jobs get skipped or run twice on those two nights every year, and log files from those hours cannot be ordered by their local timestamps alone.</p><p>Finally, UTC is not quite the same thing as GMT, and leap seconds have historically been inserted to keep clocks aligned with the rotation of the Earth. The most recent was in 2016, and in 2022 the international body responsible voted to abandon the practice by 2035 — largely because of the trouble a repeated second causes in computing.</p><h2>Storing times correctly, if you are building something</h2><p>The rule that saves the most pain: <strong>store past events as an absolute instant in UTC; store future appointments as a local time plus a zone identifier.</strong></p><p>A meeting set for 09:00 next March in Berlin should stay at 09:00 in Berlin even if Germany changes its rules in the meantime. Store it as an instant and it will silently move to 08:00 or 10:00. A log entry, by contrast, records something that already happened at a fixed instant and belongs in UTC forever. Converting to local time is a display step, done as late as possible.</p><h2>Questions people actually ask</h2><h3>Why did my recurring call shift by an hour?</h3><p>Almost certainly a transition gap — the two countries changed their clocks on different Sundays. It corrects itself when the second one switches.</p><h3>How far ahead is Sydney?</h3><p>Nine, ten or eleven hours from London depending on the month. Any single figure is wrong for part of the year.</p><h3>What should I put in a written invitation?</h3><p>A full date, the time, and either the offset or the city — and for anything crossing more than a few zones, the UTC time alongside it. Abbreviations are the thing to avoid.</p><h3>Is my location or the times I convert recorded?</h3><p>No. The conversion uses your device clock and time zone locally in the browser. Nothing is sent to a server, logged or stored.</p>"
  },
  "slug-generator": {
    "title": "Slug Generator — The Nine-Step Pipeline, and Why Transliteration Has No Right Answer",
    "description": "Turn titles into URL slugs, with the exact processing order, why accented characters have no single correct transliteration, how slugs collide, and why changing one later is expensive.",
    "keywords": "slug generator, url slug best practices, transliteration for urls, hyphens vs underscores seo, slug collision handling, changing a url slug redirect",
    "article": "<h1>What a slug is, precisely</h1><p>In <code>example.com/guides/how-to-tie-a-tie</code>, the path is <em>/guides/how-to-tie-a-tie</em> and the slug is the final segment: <em>how-to-tie-a-tie</em>. It is the human-readable handle for one page, and unlike a title it is part of an address — which means it is subject to encoding rules, uniqueness constraints and the awkward fact that other people link to it.</p><h2>The nine steps, in this order</h2><p>Order matters, and most homemade slug functions get two or three of these wrong:</p><table><tr><th>Step</th><th>Why</th></tr><tr><td>1. Normalise Unicode</td><td>Separates accents from base letters so they can be handled</td></tr><tr><td>2. Transliterate or strip marks</td><td>Turns é into e rather than deleting the letter</td></tr><tr><td>3. Lowercase, locale-independently</td><td>A locale-aware lowercase corrupts Turkish text</td></tr><tr><td>4. Replace runs of anything else with a hyphen</td><td>Spaces, punctuation, symbols</td></tr><tr><td>5. Collapse repeated hyphens</td><td>Otherwise punctuation clusters leave gaps</td></tr><tr><td>6. Trim hyphens from both ends</td><td>A title ending in a question mark leaves a trailing one</td></tr><tr><td>7. Truncate at a word boundary</td><td>Cutting mid-word reads as a mistake</td></tr><tr><td>8. Guard reserved words</td><td>A slug of admin or api can shadow a real route</td></tr><tr><td>9. Check uniqueness</td><td>Different titles can produce identical slugs</td></tr></table><p>Step three is the one with a real bug attached. If you lowercase using the user locale and that locale is Turkish, the letter i becomes a dotless ı, and every slug generated on that machine differs from the ones generated everywhere else. Slug generation is machine text handling, so it needs the locale-independent conversion.</p><h2>Transliteration has no single correct answer</h2><p>This is the part that tools quietly get wrong, because the right output depends on the <em>language</em> of the text, not on the characters in it:</p><table><tr><th>Input</th><th>Naive</th><th>Language convention</th></tr><tr><td>München</td><td>munchen</td><td>muenchen (German)</td></tr><tr><td>Malmö</td><td>malmo</td><td>malmo (Swedish, not malmoe)</td></tr><tr><td>straße</td><td>strae</td><td>strasse</td></tr><tr><td>Škoda</td><td>skoda</td><td>skoda</td></tr><tr><td>naïve</td><td>naive</td><td>naive</td></tr></table><p>German convention expands the umlaut to a following e, so ü becomes ue. Swedish does not — ä becomes a. The same code point therefore wants two different outputs depending on which language the title is in, and no generator can infer that from the string. German ß is worse: dropping the mark leaves nothing, so a generator that only strips marks turns <em>straße</em> into <em>strae</em>, which is not a word in any language.</p><p>For non-Latin scripts there is no stripping possible at all. Greek has competing transliteration standards that disagree; Chinese requires word segmentation and a dictionary before pinyin can be produced. The two legitimate options are a language-specific mapping table you maintain deliberately, or keeping the native script in the URL.</p><p>Native script is more viable than it used to be. Browsers display Unicode paths readably, and search engines index them without difficulty. The trade-off is that the underlying URL is percent-encoded, so a six-letter Cyrillic or Arabic word becomes a long run of percent-escapes the moment somebody pastes the link into plain text or an email client — visually alarming even though it works. For an audience reading that script it is usually worth it; for a mixed international audience, transliteration is calmer.</p><h2>Hyphens, underscores, and the advice that is half right</h2><p>Use hyphens. The historical reason is that search engines treated a hyphen as a word separator and an underscore as a joiner, so <em>my_first_post</em> was read as one long token. The engines have largely converged and the ranking difference now is small to nonexistent, but the convention stands for two better reasons: hyphens are what everyone expects, and an underscore is frequently invisible in a URL rendered with an underline, so readers cannot tell whether the gap is an underscore or a space.</p><p>Never use spaces — they become <code>%20</code> — and avoid anything from the reserved set, so no plus signs, ampersands, question marks, hashes or slashes inside a slug.</p><h2>Where the standard advice goes too far</h2><p><strong>Stripping stop words is often a mistake.</strong> The common advice to remove <em>and</em>, <em>the</em> and <em>a</em> comes from an era of keyword-stuffed URLs. There is no ranking bonus for a shorter slug, and removing them can wreck the match with how people actually search: <em>how-to-tie-a-tie</em> mirrors the query, while <em>tie-tie</em> does not, and reads like a truncation error. Remove filler when a slug is genuinely unwieldy; do not remove it as a rule.</p><p><strong>Slugs are not a ranking lever.</strong> A descriptive URL helps a person decide whether to click, and search engines have said readable URLs are preferable, but no amount of keyword packing in the path moves position. Search results often display a breadcrumb rather than the full path, so words beyond the first few are frequently not shown at all.</p><p><strong>Dates in slugs age badly.</strong> A path with a year in it makes an updated evergreen article look stale and makes the URL wrong once you revise it.</p><h2>Collisions, which happen more than you expect</h2><p>Stripping punctuation collapses genuinely different titles. A guide to C++ and a guide to C# both slugify to <em>c-guide</em>, because both symbols vanish. So do <em>Node.js Basics</em> and <em>Node JS Basics</em>. Two real fixes: keep a small mapping so that plus signs and sharps become words such as <em>cplusplus</em> and <em>c-sharp</em>, and always check the generated slug against existing ones before saving, appending a numeric suffix when it clashes.</p><p>The reserved-word check matters too. A page whose title happens to be Admin, API, Login or Static can produce a slug that collides with an application route, which is either a broken page or, in a badly ordered router, an unintended one.</p><p>One more: a slug containing a Cyrillic character that looks identical to a Latin one produces two distinct URLs that are visually indistinguishable. Restricting output to a known character set closes that off.</p><h2>Treat a slug as permanent</h2><p>Once published, a slug is referenced by links, bookmarks, shared messages and search indexes you do not control. Changing it breaks all of them unless the old address keeps working through a permanent redirect — and even then, redirect chains accumulate and some referrers do not follow them.</p><p>The structural answer is to decouple identity from wording: a path of <code>/123/my-article-title</code> can resolve on the number alone, so the words can change freely while every old link still lands. If the slug alone is the identifier, plan on issuing a permanent redirect and keeping it indefinitely.</p><p>A related detail worth fixing once: on a case-sensitive server, <em>/My-Post</em> and <em>/my-post</em> are two different URLs serving the same content, which is a duplicate-content problem. Redirect anything with uppercase to the lowercase form, pick one convention for the trailing slash, and set a canonical link.</p><h2>Questions people actually ask</h2><h3>Hyphens or underscores?</h3><p>Hyphens. The ranking gap has narrowed but the readability and convention arguments have not.</p><h3>Should I strip the small words?</h3><p>Only if the slug is too long. Removing them from a short, query-matching slug makes it worse, not better.</p><h3>Can I change a slug after publishing?</h3><p>Yes, but budget for it: a permanent redirect from the old path, kept in place for good, plus updates to any internal links.</p><h3>Is what I type here sent anywhere?</h3><p>No. Slugs are generated in your browser and nothing is uploaded, logged or stored, so unpublished titles stay unpublished.</p>"
  },
  "regex-tester": {
    "title": "Regex Tester — Greedy Matching, Catastrophic Backtracking, and What Regex Cannot Do",
    "description": "Test regular expressions against sample text, with the concepts that cause most bugs: greedy versus lazy quantifiers, flag behaviour, exponential backtracking, and the validation jobs regex should not be given.",
    "keywords": "regex tester, greedy vs lazy quantifier, catastrophic backtracking redos, email validation regex, regex cannot parse html, regex flags dotall unicode",
    "article": "<h1>What the engine is actually doing</h1><p>A regular expression is not a search string. It is a small program, and the engine most languages use runs it by walking the text from left to right, trying each alternative in turn and <em>backtracking</em> when a path fails. Almost every regex mystery — why a pattern matches too much, why it is slow, why it hangs — comes from that backtracking. A tester is useful because it shows you the result, but the model is what lets you predict it.</p><h2>The pieces, briefly</h2><table><tr><th>Piece</th><th>Means</th></tr><tr><td>.</td><td>Any character except a newline</td></tr><tr><td>[abc] and [^abc]</td><td>One of these, and one not of these</td></tr><tr><td>[0-9] or &#92;d</td><td>A digit</td></tr><tr><td>* + ?</td><td>Zero or more, one or more, zero or one</td></tr><tr><td>{2,5}</td><td>Between two and five</td></tr><tr><td>^ and $</td><td>Start and end of the text</td></tr><tr><td>&#92;b</td><td>A word boundary — position, not a character</td></tr><tr><td>(...) and (?:...)</td><td>Capturing group, non-capturing group</td></tr><tr><td>a|b</td><td>Either alternative</td></tr><tr><td>(?=...) and (?!...)</td><td>Lookahead: assert without consuming</td></tr></table><p>The word boundary is worth singling out because it is the fix for the commonest false positive. Searching for <code>cat</code> finds it inside <em>concatenate</em>; searching for <code>&#92;bcat&#92;b</code> does not.</p><h2>Greedy versus lazy, the concept that fixes most patterns</h2><p>Quantifiers take as much as they can and only give characters back when forced. Given the text <em>&lt;b&gt;bold&lt;/b&gt; and &lt;b&gt;more&lt;/b&gt;</em>:</p><table><tr><th>Pattern</th><th>Matches</th></tr><tr><td><code>&lt;b&gt;.*&lt;/b&gt;</code></td><td>The entire string, from the first tag to the last</td></tr><tr><td><code>&lt;b&gt;.*?&lt;/b&gt;</code></td><td>Each pair separately, as intended</td></tr></table><p>The greedy version is not broken — it is doing exactly what it was told. Adding the question mark makes the quantifier lazy, so it takes the least it can and expands only as needed. If a pattern is capturing far more than you expected, this is nearly always why.</p><h2>Flags, and the stateful one that bites</h2><table><tr><th>Flag</th><th>Effect</th></tr><tr><td>i</td><td>Case-insensitive</td></tr><tr><td>g</td><td>Find all matches, not just the first</td></tr><tr><td>m</td><td>^ and $ match at each line, not just the whole text</td></tr><tr><td>s</td><td>The dot also matches newlines</td></tr><tr><td>u</td><td>Treat the pattern as Unicode code points</td></tr></table><p>Two defaults surprise people. The dot does <strong>not</strong> match a newline unless you ask, so a pattern intended to grab a multi-line block silently stops at the first line ending. And <code>^</code> means start of the whole text, not start of a line, until you add the multiline flag — the source of countless patterns that work on one-line samples and fail on a real file.</p><p>The global flag has a trap of its own in JavaScript: a regex object with <code>g</code> keeps a position between calls, so testing the <em>same</em> pattern object against the <em>same</em> string repeatedly returns true, then false, then true. If a validation function alternates between accepting and rejecting identical input, this is the cause. Create the pattern where you use it, or drop the flag when you only need a yes or no.</p><h2>Catastrophic backtracking, which has taken down real sites</h2><p>Nested quantifiers over overlapping content make the number of paths the engine must try grow exponentially. The textbook example is <code>(a+)+b</code> tested against a run of the letter a with no b at the end. Every way of splitting the run between the inner and outer quantifier is a distinct path, and there are roughly two to the power of the length:</p><table><tr><th>Letters of input</th><th>Approximate paths tried</th></tr><tr><td>10</td><td>a thousand</td></tr><tr><td>20</td><td>a million</td></tr><tr><td>30</td><td>a billion</td></tr><tr><td>40</td><td>a trillion</td></tr></table><p>A twenty-character difference in input turns instant into forever. This is not a curiosity: it is a denial-of-service class in its own right, and it has caused well documented outages. A regular expression in a web application firewall rule took Cloudflare offline globally in July 2019 by consuming CPU across its fleet, and a pattern matching trailing whitespace on user posts took Stack Overflow down in July 2016. In both cases the pattern was correct and had passed review.</p><p>The defences, in order of usefulness: avoid a quantifier inside a quantified group; make alternatives mutually exclusive so there is nothing to redistribute; put an upper bound on repetition rather than using an open-ended plus; anchor the pattern so failure is detected early; and where the language offers atomic groups or possessive quantifiers, use them to forbid backtracking outright. Some environments provide an engine that cannot backtrack exponentially at all, which is the structural fix if you run untrusted patterns.</p><p>The testing habit that matters: try your pattern against a long input that <em>almost</em> matches but fails at the end. Happy-path samples never reveal this.</p><h2>Two jobs regex should not be given</h2><p><strong>Email addresses.</strong> Regex is routinely recommended for this and it is a poor fit. The address grammar in the relevant standard permits quoted local parts, comments in parentheses and other structures that no readable pattern captures; the well known attempts at full compliance run to thousands of characters and still get edge cases wrong. Worse, strict patterns cause real harm by rejecting valid addresses — plus-addressing, apostrophes in names, long or newer top-level domains, non-ASCII local parts.</p><p>And even a perfect pattern cannot tell you whether the mailbox exists or accepts mail, which is the thing you actually wanted to know. The defensible approach is a loose sanity check such as <code>^[^@ ]+@[^@ ]+&#92;.[^@ ]+$</code>, or the browser email input type, followed by sending a confirmation message. Deliverability is verified by delivering.</p><p><strong>Nested structures.</strong> HTML, XML and JSON nest to arbitrary depth, and a regular expression cannot count depth — this is a formal limitation of the class of languages regular expressions describe, not a matter of writing a cleverer pattern. Every regex-based HTML extractor works on the samples it was written against and breaks on attributes containing angle brackets, comments, or unexpected nesting. Use a parser. The same applies to CSV once fields can contain quoted commas and embedded line breaks.</p><p><strong>A related note on passwords.</strong> Composition patterns that demand an uppercase letter, a digit and a symbol are easy to express as regex and have fallen out of favour for good reason — the 2017 revision of the United States federal digital identity guidance dropped mandatory composition rules, because they push users towards predictable substitutions rather than genuine unpredictability. Checking length and screening against a list of breached passwords does more than any pattern.</p><h2>Flavours differ more than you expect</h2><p>A pattern that works in one language may not compile in another. Lookbehind is unsupported or restricted in several engines; named group syntax differs; POSIX bracket classes exist in some flavours and not others; and the digit shorthand means ASCII digits only in some engines and any Unicode digit in others — a difference that matters for validation.</p><p>Unicode is its own hazard. Without the Unicode flag, the dot and the quantifiers operate on storage units rather than characters, so a single emoji counts as two and a pattern limiting input to a fixed length behaves unpredictably. Turning the flag on, and using grapheme-aware handling where user-visible characters matter, avoids a family of bugs that only appear once real users arrive.</p><h2>Writing patterns you can still read later</h2><p>Use named groups instead of counting positions. Break a long pattern into two or three simpler steps applied in sequence — one comprehensible pattern plus a line of code beats one unreadable pattern. Where the language supports an extended mode, use it to add whitespace and comments. And when a pattern exceeds about eighty characters, treat that as a signal that the job may belong to a parser.</p><h2>Questions people actually ask</h2><h3>Why does my pattern match more than I wanted?</h3><p>Greedy quantifiers. Add a question mark after the star or plus to make them lazy, and check whether you need a word boundary.</p><h3>Why does my pattern hang the page?</h3><p>Almost certainly nested quantifiers on overlapping input. Test with a long near-match, then remove the nesting or bound the repetition.</p><h3>Why does the same test return true, then false?</h3><p>A reused pattern object with the global flag remembering its position. Remove the flag or build the pattern fresh.</p><h3>Are my pattern and test text sent to a server?</h3><p>No. Matching runs in your browser and nothing is transmitted, logged or stored — which matters, since sample text pasted into a tester is often real production data.</p>"
  },
  "reading-time": {
    "title": "Reading Time Estimator — The Model, Its Assumptions, and What the Label Hides",
    "description": "Estimate how long an article takes to read, with the measured speeds by reading mode, adjustments for images and code, and an honest look at whether the read-time label helps at all.",
    "keywords": "reading time estimator, average reading speed words per minute, medium read time algorithm, reading time for code blocks, does read time increase engagement",
    "article": "<h1>The formula, and the one number that decides everything</h1><p>Reading time is <code>minutes = words ÷ words per minute</code>, rounded up. That is the whole model. Everything interesting is in the divisor, because the divisor is an assumption rather than a measurement of your reader.</p><p>The best available figures come from a 2019 meta-analysis pulling together around 190 studies of reading rate, and they differ by <em>mode</em> rather than by person:</p><table><tr><th>Mode</th><th>Words per minute</th></tr><tr><td>Silent reading, non-fiction</td><td>about 238</td></tr><tr><td>Silent reading, fiction</td><td>about 260</td></tr><tr><td>Reading aloud</td><td>about 183</td></tr></table><p>Individual variation around those means is wide, and studies using different texts and tasks land anywhere from roughly 175 to 300 for ordinary adult silent reading. That range is not a rounding detail — it changes the answer substantially:</p><table><tr><th>A 1,500-word article</th><th>Estimated time</th></tr><tr><td>At 180 wpm</td><td>8.3 minutes</td></tr><tr><td>At 238 wpm</td><td>6.3 minutes</td></tr><tr><td>At 300 wpm</td><td>5.0 minutes</td></tr></table><p>The same text is a five-minute read or an eight-minute read depending purely on a constant nobody sees. Any tool describing its output as accurate is overstating what the arithmetic can deliver; what it delivers is a consistent, comparable estimate, which is genuinely useful and is not the same claim.</p><h2>Rounding makes the label coarser than it looks</h2><p>With whole-minute rounding up at 238 words per minute, an article of 240 words and an article of 470 words both display two minutes. The label is a bucket, not a measurement, and the buckets are wide at the short end.</p><p>This is also why displaying seconds is a mistake. A label reading <em>6 minutes 43 seconds</em> claims a precision the underlying model cannot support — the divisor is uncertain by twenty percent or more. Whole minutes, or the word <em>about</em>, is the honest presentation.</p><h2>What the word count leaves out</h2><p>Counting words treats a page as uniform prose. Real articles are not, and these are the adjustments that matter:</p><ul><li><strong>Images.</strong> A reader stops on them. The best known implementation, from Medium, adds twelve seconds for the first image, eleven for the second, and one second less for each subsequent image down to a floor of three seconds — the reasoning being that later images in a gallery get progressively less attention. It is a heuristic, not a finding, but it is a defensible one and better than ignoring images entirely.</li><li><strong>Code blocks.</strong> Code is read far more slowly than prose and frequently re-read. Counting a forty-line snippet as forty words of prose understates it badly; counting per line at a much slower rate is closer.</li><li><strong>Tables and formulas.</strong> These are scanned and cross-referenced rather than read left to right. Time spent does not track word count in either direction reliably.</li><li><strong>Embedded video or audio.</strong> Their duration usually dominates everything else. A six-minute video inside a three-minute article makes the label meaningless.</li><li><strong>Density.</strong> Unfamiliar terminology, dense argument and heavy citation all slow reading materially. A tool cannot see this, and it is the largest single source of error on technical writing.</li></ul><p>One implementation bug is worth naming because it is so common: counting the whole rendered page rather than the article body. Navigation, sidebar, footer links, author biography and comments can add hundreds of words, inflating every estimate on the site by a minute or more.</p><h2>Does showing a read time actually help?</h2><p>The claim that displaying an estimate increases the chance a reader finishes is repeated everywhere, including in the previous version of this page. It deserves to be stated more carefully: <strong>there is no published controlled research establishing that effect.</strong> Read-time labels became a convention after Medium adopted them around 2014, and the supporting evidence is internal product data rather than anything independently replicated.</p><p>The plausible mechanism also cuts both ways. A label reading three minutes lowers the barrier to starting. A label reading eighteen minutes tells a reader on a phone in a queue to come back later, which may mean never. Setting an expectation reduces uncertainty, and it also gives people a reason to decline.</p><p>Two secondary effects are worth watching for. Authors start writing to the number, padding a five-minute piece to look substantial or cutting necessary material to stay under a threshold. And readers use the label as a quality proxy, which it is not.</p><p>On search: reading time is not a ranking factor, and there is no documented ranking signal for how long visitors stay on a page, despite how often that is asserted. The label is a user-experience decision, not an optimisation.</p><h2>Reading time is not time on page</h2><p>The estimate describes how long the text would take to read completely. Analytics measure something different — how long a browser tab was open, sampled imperfectly — and the two rarely agree. Widely reported analyses of scroll behaviour suggest most visitors to a long article never reach its halfway point, so a ten-minute estimate and a two-minute average session are both plausibly correct descriptions of the same page.</p><p>If your real goal is helping people through long content, a scroll progress indicator does more than a number at the top, because it updates as they go rather than making a prediction at the start.</p><h2>Where the model breaks entirely</h2><p><strong>Languages without spaces.</strong> Chinese, Japanese and Thai do not delimit words with spaces, so a word count is either wrong or requires segmentation. Reading rate in those languages is measured in characters per minute, and the two units are not interchangeable — a word-based estimator applied to them produces numbers with no meaning.</p><p><strong>Languages with very different word length.</strong> German compounds and the long agglutinated forms of Finnish, Turkish and Hungarian pack more meaning into fewer words, so a word-based count understates reading time. Translating an article typically changes its word count by ten to thirty percent without changing what it says, which is enough to move the label a whole minute.</p><p><strong>Screen reader users.</strong> Many listen at rates well above typical silent reading — several hundred words per minute is common and experienced users go considerably faster. A visual reading-time estimate does not describe their experience of the page at all.</p><h2>Practical guidance</h2><p>Show a read time on long-form articles where the commitment is real; skip it on short posts, where it adds a number without adding information. Put it near the title where the decision is being made. Count the article body only. Round to whole minutes and prefer <em>about</em> or a range over false precision. Keep the divisor consistent across your site so readers learn what your labels mean, and pick something near 240 for general non-fiction rather than an optimistic 300.</p><h2>Questions people actually ask</h2><h3>What speed should I use?</h3><p>Around 238 words per minute for general non-fiction is the best-supported default. Lower it for technical or academic writing; the exact figure matters less than using the same one everywhere.</p><h3>Should images and code count?</h3><p>Yes, if your articles contain many of them. A per-image allowance and a slower rate for code lines both improve the estimate more than fine-tuning the words-per-minute figure.</p><h3>Will adding read times improve my rankings?</h3><p>No. It is not a ranking factor. It may improve how readers decide, which is a different and better reason to do it.</p><h3>Is the text I paste here stored?</h3><p>No. Counting and estimating happen in your browser. Nothing is uploaded, logged or retained, so drafts stay private.</p>"
  },
  "loan-emi": {
    "title": "Loan EMI Calculator — See the Real Interest You Will Pay",
    "description": "Work out the monthly EMI on any loan, then see the full amortisation: how much of each payment is interest, how much kills the principal, and what the loan costs in total.",
    "keywords": "loan emi calculator, emi formula, monthly instalment calculator, home loan emi, car loan emi, amortisation schedule, total interest paid",
    "article": "<h1>Loan EMI Calculator: Understanding the Formula, the Hidden Costs, and How to Pay Less Interest</h1>\n<p>EMI — Equated Monthly Instalment — is the fixed amount you pay each month on a loan. The number looks simple on a bank's website, but behind it sits a formula that determines how much of each payment goes to interest versus principal, how much total interest you will pay over the loan's lifetime, and whether you can afford the commitment.</p>\n\n<h2>The EMI formula</h2>\n<p><code>EMI = P × r × (1+r)^n / ((1+r)^n − 1)</code></p>\n<p>Where P = principal loan amount, r = monthly interest rate (annual rate ÷ 12), and n = number of monthly instalments.</p>\n\n<h2>Worked example: a $250,000 home loan</h2>\n<table>\n<tr><th>Parameter</th><th>Value</th></tr>\n<tr><td>Principal (P)</td><td>$250,000</td></tr>\n<tr><td>Annual interest rate</td><td>6.5%</td></tr>\n<tr><td>Monthly rate (r)</td><td>0.005417</td></tr>\n<tr><td>Tenure (n)</td><td>30 years (360 months)</td></tr>\n<tr><td><strong>EMI</strong></td><td><strong>$1,580</strong></td></tr>\n<tr><td>Total amount paid</td><td>$568,861</td></tr>\n<tr><td>Total interest paid</td><td>$318,861</td></tr>\n</table>\n<p>You pay more in interest ($318,861) than the original loan amount ($250,000). This surprises most borrowers and is the single most important insight the EMI calculator provides.</p>\n\n<h2>How the amortisation schedule works</h2>\n<p>In the early years, most of the EMI goes to interest. In the later years, most goes to principal. For the $250,000 example above:</p>\n<table>\n<tr><th>Month</th><th>EMI</th><th>Interest portion</th><th>Principal portion</th><th>Remaining balance</th></tr>\n<tr><td>1</td><td>$1,580</td><td>$1,354</td><td>$226</td><td>$249,774</td></tr>\n<tr><td>60 (Year 5)</td><td>$1,580</td><td>$1,273</td><td>$307</td><td>$234,447</td></tr>\n<tr><td>180 (Year 15)</td><td>$1,580</td><td>$966</td><td>$614</td><td>$177,832</td></tr>\n<tr><td>300 (Year 25)</td><td>$1,580</td><td>$424</td><td>$1,156</td><td>$76,848</td></tr>\n<tr><td>360 (Year 30)</td><td>$1,580</td><td>$9</td><td>$1,571</td><td>$0</td></tr>\n</table>\n\n<h2>The impact of tenure on total cost</h2>\n<table>\n<tr><th>Tenure</th><th>EMI</th><th>Total interest</th><th>Savings vs. 30 years</th></tr>\n<tr><td>30 years</td><td>$1,580</td><td>$318,861</td><td>—</td></tr>\n<tr><td>25 years</td><td>$1,691</td><td>$257,278</td><td>$61,583</td></tr>\n<tr><td>20 years</td><td>$1,864</td><td>$197,388</td><td>$121,473</td></tr>\n<tr><td>15 years</td><td>$2,178</td><td>$141,998</td><td>$176,863</td></tr>\n</table>\n<p>Shortening the tenure from 30 to 20 years increases the EMI by $284 per month but saves $121,473 in total interest. This trade-off is the central decision in mortgage planning.</p>\n\n<h2>Prepayment strategies</h2>\n<p><strong>Extra monthly payment:</strong> Adding $200 per month to the EMI on the 30-year loan above reduces the tenure by 6.5 years and saves approximately $95,000 in interest.</p>\n<p><strong>Annual lump sum:</strong> Making one extra EMI payment per year (13 payments instead of 12) reduces a 30-year mortgage to approximately 25.5 years.</p>\n<p><strong>Bi-weekly payments:</strong> Paying half the EMI every two weeks results in 26 half-payments = 13 full payments per year, achieving the same effect as the annual lump sum strategy.</p>\n\n<h2>Fixed vs. floating rates</h2>\n<p>Fixed-rate loans lock the interest rate for the entire tenure, making the EMI predictable. Floating-rate loans adjust periodically (usually quarterly or semi-annually) based on a benchmark rate. Floating rates are typically 0.5–1.5% lower initially but carry the risk of rising. In a falling-rate environment, floating saves money; in a rising-rate environment, fixed provides protection.</p>\n\n<h2>FAQ</h2>\n<p><strong>Does prepaying a loan always save money?</strong><br>Almost always, but check for prepayment penalties. Some fixed-rate loans charge 1–3% of the prepaid amount in the first few years. Calculate whether the penalty exceeds the interest savings.</p>\n<p><strong>Which loans should I pay off first?</strong><br>Pay off the highest interest rate loan first (the \"avalanche\" method). This minimises total interest. The alternative — paying off the smallest balance first (the \"snowball\" method) — is psychologically satisfying but mathematically inferior.</p>\n<p><strong>How much EMI can I afford?</strong><br>Financial advisors recommend that total EMI obligations (all loans) should not exceed 35–40% of net monthly income. Above 50%, the risk of financial stress increases significantly.</p>"
  },
  "tip-calculator": {
    "title": "Tip Calculator — Split a Bill and Tip Correctly",
    "description": "Calculate a tip at any percentage, split the bill between any number of people, and see the difference between tipping on the pre-tax and post-tax total.",
    "keywords": "tip calculator, split the bill, how much to tip, tip percentage, gratuity calculator, tip on pre-tax total, restaurant bill split",
    "article": "<h1>Tip Calculator: The Hidden Maths and Social Rules of Tipping</h1>\n<p>A tip calculator does simple arithmetic — multiply the bill by a percentage, optionally split it among diners — but tipping itself is anything but simple. Customs vary dramatically by country, by service type, and even by generation within the same city. Understanding the context matters as much as the calculation.</p>\n\n<h2>The basic formula</h2>\n<table>\n<tr><th>Calculation</th><th>Formula</th><th>Example ($85 bill, 20%, 4 people)</th></tr>\n<tr><td>Tip amount</td><td>Bill × Tip %</td><td>$85 × 0.20 = $17.00</td></tr>\n<tr><td>Total with tip</td><td>Bill + Tip</td><td>$85 + $17 = $102.00</td></tr>\n<tr><td>Per person (equal split)</td><td>Total / Diners</td><td>$102 / 4 = $25.50</td></tr>\n</table>\n\n<h2>Pre-tax or post-tax?</h2>\n<p>In the US, bills show a subtotal (before tax) and a total (after tax). Etiquette experts and the Emily Post Institute recommend tipping on the pre-tax subtotal, but in practice most people tip on the post-tax total because it is the number they see. The difference on a $100 meal with 8.5 percent sales tax is $1.70 at a 20 percent tip — noticeable over a year of dining out, but not a social faux pas either way.</p>\n\n<h2>Tipping standards by country</h2>\n<table>\n<tr><th>Country</th><th>Restaurant tip</th><th>Notes</th></tr>\n<tr><td>United States</td><td>18–25%</td><td>Servers earn $2.13–$7.25/hour base; tips are primary income</td></tr>\n<tr><td>Canada</td><td>15–20%</td><td>Similar to US; rising with tap-to-pay prompts</td></tr>\n<tr><td>United Kingdom</td><td>10–15% or service charge</td><td>Many restaurants add 12.5% automatically</td></tr>\n<tr><td>France</td><td>Round up or 5–10%</td><td>Service compris (included) is standard</td></tr>\n<tr><td>Germany</td><td>5–10%</td><td>Round up to the nearest euro or add 10%</td></tr>\n<tr><td>Japan</td><td>0%</td><td>Tipping is considered rude in most settings</td></tr>\n<tr><td>Australia</td><td>0–10%</td><td>Not expected; minimum wage is high</td></tr>\n<tr><td>India</td><td>5–10%</td><td>Higher in tourist areas; some add service charge</td></tr>\n</table>\n\n<h2>The economics of tipping</h2>\n<p>Tipping is a $66 billion annual transfer in the United States alone (Bureau of Labor Statistics, 2023 estimate). Economists have debated its efficiency for decades. Arguments for tipping include direct performance incentives and the ability for customers to reward exceptional service. Arguments against include income volatility for workers, racial and gender bias in tip allocation (documented in multiple peer-reviewed studies), and the fact that most customers tip a fixed percentage regardless of service quality.</p>\n\n<h2>Tip fatigue and the screen prompt effect</h2>\n<p>The rise of tablet-based point-of-sale systems (Square, Toast, Clover) has introduced tip prompts in contexts where tipping was historically uncommon: coffee shops, fast-casual counters, food trucks, and even self-checkout kiosks. A 2023 Bankrate survey found that 66 percent of Americans have a negative view of tipping culture and feel pressured by screen prompts. The phenomenon is called \"tipflation\" — the perception that expected tip percentages are rising across all service categories.</p>\n\n<h2>How to calculate tips mentally</h2>\n<p>For a 20% tip: move the decimal point one place left (that gives 10%), then double it. For $85: 10% = $8.50, doubled = $17.00. For 15%: calculate 10% ($8.50) plus half of that ($4.25) = $12.75. For 25%: calculate 10% ($8.50) times 2.5 = $21.25, or simply add a quarter of the bill.</p>\n\n<h2>Splitting bills fairly</h2>\n<p>Equal splits are mathematically simple but socially fraught when one person ordered a salad and another ordered lobster. Two alternatives: split by item (each person tips on their own subtotal) or use the \"order-weighted\" method where each person's share is proportional to their order total. The Gen Code Tools tip calculator supports both approaches.</p>\n\n<h2>FAQ</h2>\n<p><strong>Should I tip on alcohol?</strong><br>In the US and Canada, yes — tip on the full bill including drinks. In countries where service is included, no additional tip on alcohol is expected.</p>\n<p><strong>What if the service is genuinely poor?</strong><br>In tipping cultures, leaving no tip sends a message but also harms the server financially. A better approach is to tip 10–15% and speak directly to management about the issue. Leaving nothing is reserved for truly egregious situations.</p>\n<p><strong>Do I tip on takeout?</strong><br>Pre-2020, tipping on takeout was uncommon. Post-pandemic, 10–15% on takeout orders has become more common in the US, reflecting the additional packaging and coordination labour involved.</p>"
  },
  "unit-converter": {
    "title": "Unit Converter — Length, Mass, Volume and Area, Done Exactly",
    "description": "Convert between metric and imperial units using the exact defined factors, and understand where conversions go wrong: US versus imperial gallons, mass versus weight, and significant figures.",
    "keywords": "unit converter, metric to imperial, inches to cm, kg to pounds, litres to gallons, conversion factors, us gallon vs imperial gallon",
    "article": "<h1>Unit Converter: The Full Reference for Length, Weight, Volume, and More</h1>\n<p>Unit conversion is the most frequently performed calculation on the internet. Every traveller, student, engineer, and home cook encounters it. The arithmetic is multiplication or division by a conversion factor, but knowing which factor and in which direction is where mistakes happen — especially when converting between metric and imperial systems that use fundamentally different base units.</p>\n<h2>The conversion factor table</h2>\n<table>\n<tr><th>Category</th><th>From</th><th>To</th><th>Multiply by</th></tr>\n<tr><td>Length</td><td>inches</td><td>centimetres</td><td>2.54</td></tr>\n<tr><td>Length</td><td>feet</td><td>metres</td><td>0.3048</td></tr>\n<tr><td>Length</td><td>miles</td><td>kilometres</td><td>1.60934</td></tr>\n<tr><td>Weight</td><td>pounds</td><td>kilograms</td><td>0.453592</td></tr>\n<tr><td>Weight</td><td>ounces</td><td>grams</td><td>28.3495</td></tr>\n<tr><td>Volume</td><td>US gallons</td><td>litres</td><td>3.78541</td></tr>\n<tr><td>Volume</td><td>UK gallons</td><td>litres</td><td>4.54609</td></tr>\n<tr><td>Temperature</td><td>°F</td><td>°C</td><td>(°F − 32) × 5/9</td></tr>\n<tr><td>Area</td><td>acres</td><td>hectares</td><td>0.404686</td></tr>\n<tr><td>Speed</td><td>mph</td><td>km/h</td><td>1.60934</td></tr>\n</table>\n<h2>Why two measurement systems still exist</h2>\n<p>The metric system was adopted during the French Revolution (1795) and is now used by every country except the United States, Myanmar, and Liberia. The US attempted metrication in 1975 with the Metric Conversion Act, but made it voluntary. Without mandatory adoption, industries adopted selectively: science and medicine use metric; construction, cooking, and everyday life remain imperial.</p>\n<p>The result is that Americans routinely need to convert units when following international recipes, reading scientific papers, travelling abroad, or purchasing imported goods. The rest of the world primarily converts when consuming American content.</p>\n<h2>Common conversion mistakes</h2>\n<p><strong>US vs. UK gallons:</strong> A US gallon is 3.785 litres; a UK (imperial) gallon is 4.546 litres — 20% larger. Fuel economy figures (MPG) are not comparable across the Atlantic without adjusting for this difference.</p>\n<p><strong>Troy vs. avoirdupois ounces:</strong> Gold and precious metals are weighed in troy ounces (31.1g); everyday items use avoirdupois ounces (28.35g). A \"one-ounce\" gold coin is heavier than a food item listed as one ounce.</p>\n<p><strong>Nautical vs. statute miles:</strong> A nautical mile is 1.852 km (based on one minute of latitude); a statute mile is 1.609 km. Aviation and maritime navigation use nautical miles exclusively.</p>\n<h2>Digital unit conversions</h2>\n<table>\n<tr><th>From</th><th>To</th><th>Factor</th></tr>\n<tr><td>Kilobytes (KB)</td><td>Megabytes (MB)</td><td>÷ 1,024</td></tr>\n<tr><td>Megabytes (MB)</td><td>Gigabytes (GB)</td><td>÷ 1,024</td></tr>\n<tr><td>Gigabytes (GB)</td><td>Terabytes (TB)</td><td>÷ 1,024</td></tr>\n<tr><td>Megabits (Mb)</td><td>Megabytes (MB)</td><td>÷ 8</td></tr>\n</table>\n<p>The SI prefix \"kilo\" means 1,000, but in computing, storage manufacturers use 1,000 (decimal) while operating systems use 1,024 (binary). A \"500 GB\" hard drive shows as approximately 465 GB in Windows because of this discrepancy. The IEC standard introduced unambiguous prefixes — kibibyte (KiB), mebibyte (MiB) — but adoption outside technical documentation remains limited.</p>\n<h2>Cooking conversions</h2>\n<p>Baking is the most conversion-sensitive cooking application because ratios must be precise. Professional bakers weigh ingredients in grams; home recipes in the US use volume measures (cups, tablespoons). Key conversions: 1 cup flour ≈ 125g, 1 cup sugar ≈ 200g, 1 cup butter ≈ 227g, 1 tablespoon ≈ 15ml. These vary by ingredient density, which is why weight-based measurement is more accurate.</p>\n<h2>FAQ</h2>\n<p><strong>Why does the converter show so many decimal places?</strong><br>Conversion factors are exact or very precise ratios. Displaying 4–6 significant figures ensures accuracy for engineering and scientific use. For everyday use, round to the nearest whole number or one decimal place.</p>\n<p><strong>Are conversion factors exact?</strong><br>Some are exact by definition: 1 inch = exactly 2.54 cm, 1 pound = exactly 0.45359237 kg. Others are rounded approximations of measured physical constants.</p>\n<p><strong>Can I convert currency here?</strong><br>No — currency conversion requires live exchange rates that fluctuate by the second. This tool handles physical units with fixed conversion factors only.</p>"
  },
  "temperature-converter": {
    "title": "Temperature Converter — Celsius, Fahrenheit and Kelvin",
    "description": "Convert between Celsius, Fahrenheit and Kelvin, with the formulas, the point where the two scales meet, and the difference between converting a temperature and converting a temperature change.",
    "keywords": "temperature converter, celsius to fahrenheit, fahrenheit to celsius, kelvin conversion, temperature formula, minus 40, absolute zero",
    "article": "<h1>Temperature Conversion: The Scales, the Formulas, and Why We Have Three of Them</h1>\n<p>Temperature is the most converted physical quantity in everyday life. Travellers convert Fahrenheit to Celsius; scientists convert to Kelvin; engineers occasionally encounter Rankine. The formulas are simple algebra, but the history behind each scale explains why they exist and why converting between them is not as intuitive as converting metres to feet.</p>\n\n<h2>The three scales compared</h2>\n<table>\n<tr><th>Scale</th><th>Zero point</th><th>Boiling point of water</th><th>Absolute zero</th><th>Primary use</th></tr>\n<tr><td>Celsius (°C)</td><td>Freezing point of water (0°C)</td><td>100°C</td><td>−273.15°C</td><td>Most of the world, science</td></tr>\n<tr><td>Fahrenheit (°F)</td><td>Brine freezing point (0°F)</td><td>212°F</td><td>−459.67°F</td><td>United States, some Caribbean nations</td></tr>\n<tr><td>Kelvin (K)</td><td>Absolute zero (0 K)</td><td>373.15 K</td><td>0 K</td><td>Physics, chemistry, engineering</td></tr>\n</table>\n\n<h2>Conversion formulas</h2>\n<table>\n<tr><th>From → To</th><th>Formula</th><th>Example</th></tr>\n<tr><td>°C → °F</td><td>(°C × 9/5) + 32</td><td>100°C → 212°F</td></tr>\n<tr><td>°F → °C</td><td>(°F − 32) × 5/9</td><td>72°F → 22.2°C</td></tr>\n<tr><td>°C → K</td><td>°C + 273.15</td><td>25°C → 298.15 K</td></tr>\n<tr><td>K → °C</td><td>K − 273.15</td><td>0 K → −273.15°C</td></tr>\n<tr><td>°F → K</td><td>(°F − 32) × 5/9 + 273.15</td><td>32°F → 273.15 K</td></tr>\n</table>\n\n<h2>Why Fahrenheit feels arbitrary</h2>\n<p>Daniel Fahrenheit designed his scale in 1724 using three reference points: 0°F was the temperature of a brine solution (the coldest he could reliably produce), 32°F was the freezing point of water, and 96°F was human body temperature (later corrected to 98.6°F). The scale was practical for 18th-century meteorology because it avoided negative numbers in most European winter temperatures and provided finer resolution than Celsius — one Fahrenheit degree is 5/9 of a Celsius degree.</p>\n\n<h2>Quick mental conversion tricks</h2>\n<p><strong>°C to °F (approximate):</strong> Double the Celsius value and add 30. This gives 100°C → 230°F (actual: 212°F) — rough but useful for everyday ranges. Between 0–40°C, the error is under 5°F.</p>\n<p><strong>The crossover point:</strong> −40° is the same in both Celsius and Fahrenheit. This is the only intersection of the two scales and a useful mnemonic anchor.</p>\n<p><strong>Body temperature benchmark:</strong> 37°C = 98.6°F. Room temperature: 20–22°C = 68–72°F. Comfortable swimming pool: 26–28°C = 79–82°F.</p>\n\n<h2>Common reference temperatures</h2>\n<table>\n<tr><th>Context</th><th>°C</th><th>°F</th><th>K</th></tr>\n<tr><td>Absolute zero</td><td>−273.15</td><td>−459.67</td><td>0</td></tr>\n<tr><td>Antarctic winter</td><td>−50</td><td>−58</td><td>223</td></tr>\n<tr><td>Water freezes</td><td>0</td><td>32</td><td>273</td></tr>\n<tr><td>Room temperature</td><td>21</td><td>70</td><td>294</td></tr>\n<tr><td>Human body</td><td>37</td><td>98.6</td><td>310</td></tr>\n<tr><td>Water boils</td><td>100</td><td>212</td><td>373</td></tr>\n<tr><td>Oven baking</td><td>180</td><td>356</td><td>453</td></tr>\n<tr><td>Surface of the Sun</td><td>5,500</td><td>9,932</td><td>5,773</td></tr>\n</table>\n\n<h2>Cooking and baking conversions</h2>\n<p>Recipes from British, Australian, and European sources use Celsius. American recipes use Fahrenheit. The most common conversions: 180°C = 350°F (moderate oven), 200°C = 400°F (hot oven), 220°C = 425°F (very hot). Gas mark conversions add another layer: Gas Mark 4 = 180°C = 350°F.</p>\n\n<h2>Scientific context: why Kelvin matters</h2>\n<p>Kelvin is the SI unit of temperature and the only scale where zero means the complete absence of thermal energy. This makes it essential for thermodynamic calculations: the ideal gas law (PV = nRT) requires temperature in Kelvin. Using Celsius in the equation produces wrong results because the scale has an arbitrary zero point.</p>\n\n<h2>FAQ</h2>\n<p><strong>Why does the US still use Fahrenheit?</strong><br>The US attempted to switch to metric in the 1970s (Metric Conversion Act, 1975) but the transition stalled due to public resistance and lack of mandatory enforcement. Fahrenheit remains the default for weather, cooking, and medical use.</p>\n<p><strong>Is there a temperature below absolute zero?</strong><br>In classical thermodynamics, no. In quantum mechanics, negative absolute temperatures exist in specific systems (population-inverted lasers), but these are \"hotter\" than any positive temperature — the concept does not mean \"colder than zero.\"</p>\n<p><strong>Which scale is most precise?</strong><br>All three scales have the same precision when expressed to the same number of decimal places. Fahrenheit has smaller degrees (1°F = 0.556°C), which gives slightly finer resolution without decimals, but this is rarely a practical advantage.</p>"
  },
  "water-intake": {
    "title": "Water Intake Calculator — How Much You Actually Need",
    "description": "Estimate a daily water target from your body weight, activity and climate, and learn why the eight-glasses rule is a misquotation and why urine colour beats any calculator.",
    "keywords": "water intake calculator, how much water should i drink, daily water requirement, hydration calculator, 8x8 rule, ml per kg water",
    "article": "<h1>Where the number comes from</h1><p>The most widely used clinical rule of thumb is roughly <strong>30 to 40 ml of total water per kilogram of body weight per day</strong> for a healthy adult in a temperate climate. Taking the middle of that range, a 70 kg adult lands on 70 × 35 = <strong>2,450 ml</strong>, or about 2.5 litres of total water.</p><p>The word <em>total</em> is doing a lot of work there. Total water includes everything: plain water, tea, coffee, milk, juice, soup, and the water content of solid food. Roughly <strong>20 to 30% of daily water intake comes from food</strong> — fruit and vegetables are 80 to 95% water, and even bread is around 35%. So a 2,450 ml total target means drinking closer to 1,800 to 2,000 ml. Calculators that hand you a total and imply you must drink all of it are overshooting by about a fifth.</p><p>For comparison, the US Institute of Medicine set adequate <em>total</em> water intake at about 3.7 litres a day for men and 2.7 for women, again including food. Those are population averages for planning, not individual prescriptions.</p><h2>The eight-glasses rule is a misquotation</h2><p>Eight eight-ounce glasses is 1.9 litres, and the figure is repeated everywhere without a source. The likely origin is a 1945 US National Research Council recommendation of about 1 ml of water per calorie consumed — which for a 2,000 calorie diet gives 2 litres. But that document explicitly added that <em>most of this quantity is contained in prepared foods</em>. The caveat was dropped somewhere in the retelling and the number became a drinking target. There is no controlled trial establishing eight glasses as a threshold for health.</p><h2>What genuinely changes your requirement</h2><table><tr><th>Factor</th><th>Rough adjustment</th><th>Why</th></tr><tr><td>Moderate exercise</td><td>+400 to 800 ml per hour</td><td>Sweat losses of 0.5 to 2 L per hour depending on intensity</td></tr><tr><td>Hot or humid climate</td><td>+500 to 1,000 ml</td><td>Higher baseline sweat rate even at rest</td></tr><tr><td>High altitude above 2,500 m</td><td>+300 to 500 ml</td><td>Increased respiratory water loss and diuresis</td></tr><tr><td>Fever, vomiting, diarrhoea</td><td>Substantially more</td><td>Losses can outpace thirst; oral rehydration salts may be needed</td></tr><tr><td>Pregnancy</td><td>+300 ml</td><td>Increased plasma volume</td></tr><tr><td>Breastfeeding</td><td>+700 to 1,000 ml</td><td>Milk is about 87% water</td></tr><tr><td>High-protein or high-fibre diet</td><td>Modestly more</td><td>Greater renal solute load; fibre binds water in the gut</td></tr></table><h2>A better indicator than any formula</h2><p>Your kidneys regulate hydration far more precisely than a weight-based estimate can. Two signals are worth more than the number this tool gives you:</p><ul><li><strong>Urine colour.</strong> Pale straw is well hydrated. Dark amber or a strong smell suggests you are behind. Completely colourless all day may mean you are drinking more than you need. Note that B vitamins, beetroot and some medications colour urine independently of hydration.</li><li><strong>Thirst.</strong> For healthy adults under normal conditions, drinking to thirst is sufficient and is what physiology is designed for. Thirst becomes less reliable in older adults, during hard endurance exercise, and in some illnesses — those are the situations where a deliberate schedule helps.</li></ul><h2>More is not always better</h2><p>This deserves stating plainly because most hydration content omits it. Drinking far beyond your needs, especially quickly, can dilute blood sodium and cause <strong>hyponatraemia</strong>, which ranges from headache and nausea to seizures and is occasionally fatal. Documented cases cluster in marathon runners who drank plain water heavily during long events, in some water-drinking challenges, and in people with kidney, heart or liver conditions or on certain medications. Healthy kidneys can excrete roughly 0.8 to 1 litre per hour, so sustained intake above that is the danger zone. If you are exercising for more than about 90 minutes, replacing electrolytes as well as water matters more than volume alone.</p><h2>Honest limits of this estimate</h2><p>This is a general-population starting point built on body weight and a few adjustments. It cannot account for your kidney function, heart or liver condition, medications such as diuretics or lithium, sweat sodium concentration, or an actual measured sweat rate. If you have a diagnosed condition affecting fluid balance, or you have been given a fluid restriction, follow your clinician rather than a web calculator. Nothing here is medical advice.</p><h2>Questions people actually ask</h2><h3>Does coffee dehydrate me?</h3><p>Not at habitual doses. Caffeine is a mild diuretic, but the water in the drink more than compensates, and regular consumers develop tolerance to the diuretic effect. Coffee and tea count toward your intake.</p><h3>Does drinking more water help with weight loss?</h3><p>Modestly, and indirectly. Water has no calories, so replacing sweetened drinks with it cuts intake, and a glass before a meal can slightly reduce how much people eat. Water itself does not burn fat.</p><h3>Should I weigh myself to check?</h3><p>For exercise, yes — it is the most practical method available. Weigh yourself before and after a session; each kilogram lost is roughly one litre of sweat. Replacing about 125 to 150% of that over the following hours restores balance.</p><h3>Is anything I enter here stored?</h3><p>No. Your weight and activity level are used only in your browser to compute the estimate, and nothing is transmitted or saved.</p>"
  },
  "macro-calculator": {
    "title": "Macro Calculator — Protein, Fat and Carbs From Your Actual Numbers",
    "description": "Work out daily calories with the Mifflin-St Jeor equation, then split them into protein, fat and carbohydrate using evidence-based ranges, with a full worked example.",
    "keywords": "macro calculator, macronutrient split, mifflin st jeor, tdee calculator, protein per kg, cutting macros, bulking macros, iifym",
    "article": "<h1>Macro Calculator: Protein, Carbs, and Fat — How to Set Targets That Actually Work</h1>\n<p>A macro calculator converts a daily calorie target into grams of protein, carbohydrates, and fat based on your goals (weight loss, maintenance, or muscle gain). The three macronutrients provide all dietary energy: protein and carbs at 4 calories per gram, fat at 9 calories per gram. The ratio you choose affects body composition, satiety, exercise performance, and adherence.</p>\n<h2>Calorie content of macronutrients</h2>\n<table><tr><th>Macronutrient</th><th>Calories per gram</th><th>Primary function</th></tr>\n<tr><td>Protein</td><td>4</td><td>Muscle repair, enzyme production, satiety</td></tr>\n<tr><td>Carbohydrates</td><td>4</td><td>Primary energy source, brain fuel, glycogen replenishment</td></tr>\n<tr><td>Fat</td><td>9</td><td>Hormone production, cell membranes, fat-soluble vitamin absorption</td></tr>\n<tr><td>Alcohol</td><td>7</td><td>No nutritional function; metabolised as priority fuel</td></tr></table>\n<h2>Recommended macro splits by goal</h2>\n<table><tr><th>Goal</th><th>Protein</th><th>Carbs</th><th>Fat</th><th>Rationale</th></tr>\n<tr><td>Weight loss</td><td>30–35%</td><td>35–40%</td><td>25–30%</td><td>Higher protein preserves muscle and increases satiety</td></tr>\n<tr><td>Maintenance</td><td>25–30%</td><td>40–50%</td><td>25–30%</td><td>Balanced for sustained energy and health</td></tr>\n<tr><td>Muscle gain</td><td>25–30%</td><td>45–55%</td><td>20–25%</td><td>Higher carbs fuel training; adequate protein supports hypertrophy</td></tr>\n<tr><td>Keto / low-carb</td><td>20–25%</td><td>5–10%</td><td>65–75%</td><td>Very low carbs force ketosis; high fat provides primary fuel</td></tr></table>\n<h2>Worked example: 2,200 calorie weight loss plan</h2>\n<table><tr><th>Macro</th><th>% of calories</th><th>Calories</th><th>Grams</th></tr>\n<tr><td>Protein (30%)</td><td>660</td><td>660 ÷ 4</td><td>165g</td></tr>\n<tr><td>Carbs (40%)</td><td>880</td><td>880 ÷ 4</td><td>220g</td></tr>\n<tr><td>Fat (30%)</td><td>660</td><td>660 ÷ 9</td><td>73g</td></tr></table>\n<h2>Protein requirements: what the research actually says</h2>\n<p>The RDA for protein (0.8 g/kg/day) is the minimum to prevent deficiency, not the optimal amount for active individuals. A 2018 meta-analysis by Morton et al. in the British Journal of Sports Medicine found that 1.6 g/kg/day maximises muscle protein synthesis in resistance-trained adults. Beyond 2.2 g/kg/day, additional protein shows no further benefit in most studies.</p>\n<p>For a 75 kg person: RDA = 60g, optimal for training = 120g, upper useful limit ≈ 165g. The difference between minimum and optimal is substantial — and most casual dieters undereat protein.</p>\n<h2>Common macro tracking mistakes</h2>\n<p><strong>Ignoring fibre:</strong> Fibre is a carbohydrate that is not fully digested. \"Net carbs\" (total carbs minus fibre) is a more accurate measure for low-carb dieters. A serving of vegetables might show 15g carbs but only 8g net carbs.</p>\n<p><strong>Neglecting micronutrients:</strong> Hitting macro targets with processed food is possible but nutritionally poor. 165g of protein from chicken breast is not the same as 165g from protein bars — the whole food delivers iron, B vitamins, and zinc alongside the protein.</p>\n<p><strong>Obsessive precision:</strong> Tracking macros to the gram creates an unhealthy relationship with food for some people. Aiming within ±10% of targets is sufficient for results. Perfect adherence is unnecessary and often counterproductive.</p>\n<h2>FAQ</h2>\n<p><strong>Do I need to track macros to lose weight?</strong><br>No — a calorie deficit is sufficient for weight loss regardless of macro composition. But tracking protein ensures you preserve muscle, and tracking carbs/fat helps identify overeating patterns.</p>\n<p><strong>Is a high-protein diet safe for kidneys?</strong><br>For healthy individuals, yes — no evidence links high-protein diets (up to 2.2 g/kg) to kidney damage. People with pre-existing kidney disease should consult a doctor before increasing protein intake.</p>\n<p><strong>Should I adjust macros on rest days?</strong><br>Some athletes reduce carbs by 10–20% on rest days and increase fat slightly, keeping protein constant. For most people, the difference is marginal — consistency across all days matters more than daily optimisation.</p>"
  },
  "calorie-burn": {
    "title": "Calorie Burn Calculator — MET Values and What They Really Tell You",
    "description": "Estimate calories burned in any activity using published MET values, understand the gross versus net distinction, and see why every burn figure carries a wide error bar.",
    "keywords": "calorie burn calculator, calories burned walking, met values, exercise calorie calculator, calories burned running, net vs gross calories",
    "article": "<h1>Calorie Burn Calculator: MET Values, the Formula, and What the Numbers Get Wrong</h1>\n<p>Calorie burn calculators estimate how many calories you expend during an activity based on your weight, the duration, and the activity's MET (Metabolic Equivalent of Task) value. The formula is standardised and used by every fitness tracker on the market — but the error margins are larger than most apps admit.</p>\n<h2>The formula</h2>\n<p><code>Calories Burned = MET × Weight (kg) × Duration (hours)</code></p>\n<p>1 MET equals the energy cost of sitting quietly: approximately 1 kcal per kilogram of body weight per hour. An activity rated at 5 METs burns 5 times as much energy as sitting.</p>\n<h2>MET values for common activities</h2>\n<table><tr><th>Activity</th><th>MET value</th><th>Calories/hour (70 kg person)</th></tr>\n<tr><td>Sitting (resting metabolic rate)</td><td>1.0</td><td>70</td></tr>\n<tr><td>Walking (3 mph / 5 km/h)</td><td>3.5</td><td>245</td></tr>\n<tr><td>Cycling (moderate, 12–14 mph)</td><td>8.0</td><td>560</td></tr>\n<tr><td>Running (6 mph / 10 min/mile)</td><td>9.8</td><td>686</td></tr>\n<tr><td>Swimming (moderate laps)</td><td>7.0</td><td>490</td></tr>\n<tr><td>Weight training (general)</td><td>3.5</td><td>245</td></tr>\n<tr><td>Yoga (Hatha)</td><td>2.5</td><td>175</td></tr>\n<tr><td>HIIT</td><td>8.0–12.0</td><td>560–840</td></tr>\n<tr><td>Cleaning house</td><td>3.3</td><td>231</td></tr>\n<tr><td>Mowing lawn (push mower)</td><td>5.5</td><td>385</td></tr></table>\n<h2>Why the numbers are estimates, not measurements</h2>\n<p>MET values are population averages from the Compendium of Physical Activities (Ainsworth et al.), measured in laboratory settings with specific subjects. Your actual calorie burn varies based on:</p>\n<ul>\n<li><strong>Fitness level:</strong> A trained runner burns fewer calories per mile than a beginner because their movement is more efficient</li>\n<li><strong>Body composition:</strong> Muscle burns more energy at rest and during activity than fat</li>\n<li><strong>Age:</strong> Metabolic rate declines approximately 1–2% per decade after age 20</li>\n<li><strong>Genetics:</strong> Individual metabolic variation is 10–15% around the population mean</li>\n<li><strong>Environment:</strong> Cold temperatures increase calorie burn; altitude affects oxygen utilisation</li>\n</ul>\n<p>The typical error range for MET-based calorie estimates is ±15–20%. A reading of 500 calories could mean anywhere from 400 to 600 in reality.</p>\n<h2>Fitness tracker accuracy</h2>\n<p>A 2017 Stanford study found that the most accurate consumer wrist-worn devices had a median heart-rate error of 5% but a calorie-burn error of 27%. Chest-strap heart rate monitors combined with VO2 testing are more accurate but impractical for daily use. Treat tracker numbers as directional indicators, not precise measurements.</p>\n<h2>The afterburn effect (EPOC)</h2>\n<p>Excess Post-exercise Oxygen Consumption (EPOC) refers to the elevated calorie burn that continues after intense exercise. High-intensity interval training (HIIT) can produce EPOC effects lasting 12–38 hours, adding an estimated 6–15% to the session's calorie total. Steady-state cardio produces minimal EPOC. Most calorie calculators do not account for EPOC, making them slightly conservative for high-intensity activities.</p>\n<h2>FAQ</h2>\n<p><strong>Do I burn more calories if I weigh more?</strong><br>Yes — the formula multiplies MET by body weight. A 90 kg person burns approximately 29% more calories than a 70 kg person performing the same activity for the same duration.</p>\n<p><strong>Is walking or running better for calorie burn?</strong><br>Per unit of time, running burns more (9.8 vs. 3.5 METs). Per unit of distance, they are more similar — running a mile and walking a mile burn roughly 80–100 kcal, but running gets there faster.</p>\n<p><strong>Should I eat back the calories I burn?</strong><br>Not fully — because the calorie estimate is likely 15–20% too high. Eating back 50–75% of exercise calories is a safer approach to avoid negating the deficit.</p>"
  },
  "ideal-weight": {
    "title": "Ideal Weight Calculator — Four Formulas, and Why They Disagree",
    "description": "Compare the Devine, Robinson, Miller and Hamwi ideal-weight formulas against the healthy BMI range, and see why a single ideal number is a clinical fiction.",
    "keywords": "ideal weight calculator, devine formula, robinson formula, hamwi formula, healthy weight range, ideal body weight for height",
    "article": "<h1>There is no single ideal weight, and the formulas prove it</h1><p>Four equations are in common use, all built as <em>weight from height</em>, and they give different answers for the same person. For a man of 175 cm — which is 68.9 inches, or 8.9 inches over five feet:</p><table><tr><th>Formula</th><th>Year</th><th>Rule for men</th><th>Result at 175 cm</th></tr><tr><td>Hamwi</td><td>1964</td><td>48 kg + 2.7 kg per inch over 5 ft</td><td>72.0 kg</td></tr><tr><td>Devine</td><td>1974</td><td>50 kg + 2.3 kg per inch over 5 ft</td><td>70.5 kg</td></tr><tr><td>Robinson</td><td>1983</td><td>52 kg + 1.9 kg per inch over 5 ft</td><td>68.9 kg</td></tr><tr><td>Miller</td><td>1983</td><td>56.2 kg + 1.41 kg per inch over 5 ft</td><td>68.8 kg</td></tr></table><p>A spread of 3.2 kg between formulas that are all called <em>ideal</em>. Now compare that to the healthy BMI range of 18.5 to 24.9, which at 1.75 m spans <strong>56.7 kg to 76.3 kg</strong> — a window nearly 20 kg wide. Four different point estimates sitting inside one very broad healthy band is the clearest evidence that the precision implied by these formulas does not exist.</p><h2>What these formulas were built for</h2><p>This is the fact that reframes everything. The Devine formula, the most cited of the four, was published in 1974 as a way to <strong>calculate drug doses</strong> — specifically to scale medications that distribute through lean tissue rather than fat, so that dosing an obese patient by total body weight would not overshoot. It was never validated as a health or aesthetic target. Hamwi came from a diabetes-education context for estimating calorie needs. Their survival as consumer <em>ideal weight</em> tools is an accident of convenience, not evidence.</p><p>They are still genuinely useful in clinical practice for ventilator tidal volume settings, chemotherapy dosing and renal function estimates. They are poor guides for what you should weigh.</p><h2>Why height alone cannot decide your weight</h2><p>Every one of these equations takes a single input. Things they cannot see:</p><ul><li><strong>Muscle mass.</strong> Muscle is denser than fat. A trained 175 cm athlete at 82 kg may carry less body fat than a sedentary person at 70 kg, while the formula calls the athlete overweight.</li><li><strong>Frame size.</strong> Skeletal width varies substantially. Older height-weight tables at least had small, medium and large frame columns; these formulas dropped them.</li><li><strong>Fat distribution.</strong> Visceral fat around the organs carries far more metabolic risk than the same mass on hips and thighs. Two people at identical weight can have very different risk profiles.</li><li><strong>Age and sex differences beyond the constant.</strong> Body composition shifts with age even at stable weight.</li><li><strong>Ethnicity.</strong> Health risk thresholds differ measurably between populations; several health authorities use a lower overweight cut-off for people of South Asian, Chinese and Japanese descent.</li></ul><h2>Measures that predict health better</h2><p>If the actual question is health rather than a number on a chart, these are more informative and just as easy to take at home:</p><ul><li><strong>Waist to height ratio.</strong> Keep your waist under half your height. At 175 cm that means a waist below about 87 cm. This single ratio predicts cardiometabolic risk at least as well as BMI and better in athletic and older populations.</li><li><strong>Waist circumference.</strong> Commonly used thresholds are above 94 cm for men and 80 cm for women for increased risk, with higher-risk lines at 102 and 88 cm.</li><li><strong>Trend over time.</strong> Whether your weight and waist are stable, rising or falling over months tells you more than any single reading compared to a formula.</li><li><strong>Fitness markers.</strong> Resting heart rate, how you handle stairs, and strength relative to bodyweight track health outcomes independently of weight.</li></ul><h2>Honest limits</h2><p>Use the figures on this page as a rough orientation point and nothing more. They do not apply to children or adolescents, to pregnant or breastfeeding women, to people with significant muscle mass or amputation, or to anyone with fluid retention from a heart, kidney or liver condition. A healthy weight for you is a conversation with a clinician who can see your body composition, history and blood work. This page is general information, not medical advice, and if weight is a source of anxiety or you have any history of disordered eating, a formula is the wrong tool entirely.</p><h2>Questions people actually ask</h2><h3>Which formula should I use?</h3><p>For orientation, none of them individually — look at the range they produce together, and check it against the healthy BMI band. If a clinician has asked you for ideal body weight for a dosing calculation, Devine is the usual convention.</p><h3>Why do men and women get different constants?</h3><p>Because average lean mass and body composition differ, the equations shift the baseline down by a few kilograms for women. It is a population average being applied to an individual, with all the imprecision that implies.</p><h3>My BMI says overweight but I lift weights. Is that meaningful?</h3><p>Usually not. BMI cannot distinguish muscle from fat, and it misclassifies muscular people routinely. Waist to height ratio is the better check in that situation.</p><h3>Is anything I enter here saved?</h3><p>No. Your height and sex are used only in your browser to run the four formulas, and nothing is transmitted or stored.</p>"
  },
  "investment-return": {
    "title": "Investment Return Calculator — CAGR, Total Return and Real Return",
    "description": "Turn a start value and an end value into an annualised return with the CAGR formula, then adjust for inflation to see what the gain was actually worth.",
    "keywords": "investment return calculator, cagr formula, annualised return, real vs nominal return, total return, compound annual growth rate, inflation adjusted return",
    "article": "<h1>Investment Return Calculator: CAGR, Total Return, and What the Numbers Actually Tell You</h1>\n<p>An investment return calculator takes a starting amount, an ending amount, and a time period, and computes the return. The simplest version is total return: (end − start) / start × 100%. But total return is misleading for comparing investments of different durations. A 50% return over 10 years is very different from a 50% return over 2 years. CAGR — Compound Annual Growth Rate — normalises for time.</p>\n<h2>Key formulas</h2>\n<table><tr><th>Metric</th><th>Formula</th><th>Use case</th></tr>\n<tr><td>Total return</td><td>(End − Start) / Start × 100%</td><td>Single investment, single time period</td></tr>\n<tr><td>CAGR</td><td>(End / Start)^(1/years) − 1</td><td>Comparing investments of different durations</td></tr>\n<tr><td>Annualised return</td><td>Same as CAGR for lump sums</td><td>Industry standard for fund performance</td></tr>\n<tr><td>Real return</td><td>(1 + nominal) / (1 + inflation) − 1</td><td>Purchasing power assessment</td></tr></table>\n<h2>Worked example</h2>\n<table><tr><th>Detail</th><th>Investment A</th><th>Investment B</th></tr>\n<tr><td>Initial investment</td><td>$10,000</td><td>$10,000</td></tr>\n<tr><td>Final value</td><td>$15,000</td><td>$18,000</td></tr>\n<tr><td>Holding period</td><td>3 years</td><td>7 years</td></tr>\n<tr><td>Total return</td><td>50%</td><td>80%</td></tr>\n<tr><td>CAGR</td><td>14.47%</td><td>8.78%</td></tr></table>\n<p>Investment B has a higher total return but a lower annualised return. Investment A grew faster per year. CAGR makes this comparison fair.</p>\n<h2>Historical benchmarks</h2>\n<table><tr><th>Asset class</th><th>Nominal CAGR (1926–2023)</th><th>Real CAGR (after inflation)</th></tr>\n<tr><td>US large-cap stocks (S&P 500)</td><td>10.1%</td><td>6.9%</td></tr>\n<tr><td>US small-cap stocks</td><td>11.7%</td><td>8.5%</td></tr>\n<tr><td>Long-term government bonds</td><td>5.2%</td><td>2.2%</td></tr>\n<tr><td>Treasury bills (cash equivalent)</td><td>3.3%</td><td>0.3%</td></tr>\n<tr><td>Gold</td><td>4.9% (1971–2023)</td><td>1.8%</td></tr>\n<tr><td>Inflation (CPI)</td><td>3.0%</td><td>—</td></tr></table>\n<h2>The rule of 72</h2>\n<p>A quick mental shortcut: divide 72 by the annual return to estimate how many years it takes to double your money. At 8% CAGR, money doubles in approximately 9 years. At 12%, approximately 6 years. The rule is accurate within ±1 year for returns between 4% and 20%.</p>\n<h2>Why past returns don't predict future performance</h2>\n<p>The SEC requires this disclaimer on all investment materials, and the data supports it. The S&P 500's 10-year annualised return has ranged from −3% (2000–2009) to +18% (2009–2019). Cherry-picking the start and end dates dramatically changes the result. The 97-year average of ~10% is meaningful for very long horizons (30+ years) but unreliable for any specific decade.</p>\n<h2>Fees and their compound impact</h2>\n<p>A 1% annual management fee seems small, but over 30 years on a $100,000 investment at 8% return, fees reduce the final balance from $1,006,266 to $761,226 — a $245,040 difference. Every percentage point of fees is a permanent drag that compounds alongside your returns. Index funds (0.03–0.10% fees) versus actively managed funds (0.50–1.50% fees) is the highest-impact financial decision most investors face.</p>\n<h2>FAQ</h2>\n<p><strong>Should I use nominal or real returns for planning?</strong><br>Real (inflation-adjusted) returns for long-term goals like retirement. Nominal returns for comparing investment products, since fees and taxes are deducted from nominal returns.</p>\n<p><strong>What is a \"good\" return?</strong><br>Context-dependent. A 7% real return is historically excellent for a diversified equity portfolio. A 4% real return is good for a balanced (60/40) portfolio. Anything promising consistent returns above 15% with low risk should be treated with extreme scepticism.</p>\n<p><strong>How do dividends affect the calculation?</strong><br>Include reinvested dividends in the \"final value\" for total return. Many published index returns (e.g., S&P 500 \"total return\") include dividends; the \"price return\" version does not. The difference is approximately 2% per year.</p>"
  },
  "credit-card-payoff": {
    "title": "Credit Card Payoff Calculator — What the Minimum Payment Really Costs",
    "description": "See how long a credit card balance takes to clear at any monthly payment, how much of it is interest, and why the minimum payment can leave a debt outstanding almost indefinitely.",
    "keywords": "credit card payoff calculator, minimum payment trap, credit card interest, debt avalanche vs snowball, balance transfer, apr to monthly rate",
    "article": "<h1>Start by converting the APR</h1><p>Credit card interest is quoted annually but charged monthly. Divide by twelve to get the monthly rate: a 24% APR is <strong>2% a month</strong>. On a 5,000 balance that is 100 of interest added every single month before any of your payment touches the principal.</p><p>The payoff period for a fixed monthly payment comes from the annuity formula rearranged for time:</p><p><code>Months = −ln(1 − r × P ÷ M) ÷ ln(1 + r)</code></p><p>where P is the balance, r the monthly rate and M your payment. The formula contains the whole story, because if <code>r × P</code> equals M, the logarithm is undefined — the debt never clears.</p><h2>The worked example, and the cliff</h2><p>A balance of 5,000 at 24% APR:</p><table><tr><th>Monthly payment</th><th>Time to clear</th><th>Total paid</th><th>Interest paid</th></tr><tr><td>100</td><td><strong>Never</strong></td><td>Unlimited</td><td>Unlimited</td></tr><tr><td>150</td><td>55 months, over 4.5 years</td><td>8,321</td><td>3,321</td></tr><tr><td>200</td><td>35 months</td><td>7,001</td><td>2,001</td></tr><tr><td>300</td><td>21 months</td><td>6,145</td><td>1,145</td></tr><tr><td>500</td><td>12 months</td><td>5,634</td><td>634</td></tr></table><p>Look at the first row. Paying 100 a month on this balance is paying exactly the interest and nothing else — after ten years you would have handed over 12,000 and still owe 5,000. That is not a hypothetical; it is what happens whenever the payment equals the monthly interest charge.</p><p>Now look at the difference between 150 and 300. Doubling the payment does not halve the cost — it cuts the interest by two thirds and the time by nearly three quarters. Every extra unit above the interest charge attacks the principal directly, and the effect compounds. This is the single most useful thing to know about card debt.</p><h2>Why the minimum payment is designed this way</h2><p>Most issuers set the minimum as a small percentage of the balance plus that month accrued interest, often around 1% plus interest, with a floor of 25 or so. Because the percentage shrinks as the balance shrinks, the minimum falls too, and the payoff stretches out. On our 5,000 balance the first minimum would be about 150, and following the declining minimum for the whole life of the debt takes roughly <strong>18 years</strong> and costs several times the original amount.</p><p>Card statements in many countries are now legally required to print how long the minimum payment will take, precisely because so few people worked it out. If your statement shows that line, read it.</p><h2>Which debt to attack first</h2><p>With several cards, two strategies are commonly recommended and they optimise different things:</p><ul><li><strong>Avalanche.</strong> Pay minimums everywhere, then throw everything spare at the <em>highest APR</em>. This is mathematically optimal and always costs the least interest.</li><li><strong>Snowball.</strong> Attack the <em>smallest balance</em> first. It costs slightly more, but clearing a whole card early produces a visible win, and behavioural studies do find higher completion rates. A plan you finish beats an optimal plan you abandon.</li></ul><p>If the APR gap between your cards is large, avalanche wins clearly. If the balances are similar in cost, snowball is a reasonable choice.</p><h2>Balance transfers, honestly assessed</h2><p>A 0% transfer offer for 18 months with a 3% fee costs 150 on our 5,000 balance, against 3,321 of interest at 24% while paying 150 a month. The arithmetic is overwhelming — but only if you meet three conditions: you clear it, or nearly clear it, before the promotional rate expires; you do not put new spending on either card; and you do not miss a payment, which on most offers cancels the promotional rate immediately. Transfers fail as a strategy when they are used as breathing space rather than as a deadline.</p><h2>Honest limits</h2><p>This calculation assumes a fixed rate, a fixed payment, and no new spending. Real cards can have different rates for purchases, cash advances and transfers, and payments are typically allocated to the highest-rate balance first in some jurisdictions and the lowest in others. Penalty APRs after a missed payment can exceed 29%. Cash advances usually accrue interest from day one with no grace period. If your debt is unmanageable, a free non-profit debt counselling service can negotiate in ways a calculator cannot — that route is worth taking before any high-cost consolidation loan. Nothing here is financial advice.</p><h2>Questions people actually ask</h2><h3>Does the exact payment date matter?</h3><p>Somewhat. Most cards compute interest on an average daily balance, so paying earlier in the cycle reduces that average and shaves a little interest. Paying twice a month rather than once has a small but real effect.</p><h3>Will paying it off hurt my credit score?</h3><p>No. Lowering your utilisation ratio is one of the strongest positive factors. Keeping the account open with a zero balance is usually better for your score than closing it, since closing reduces your total available credit and can shorten average account age.</p><h3>Should I use savings to clear the card?</h3><p>Generally yes, when the card rate far exceeds any interest your savings earn — 24% against 4% is not a close call. The usual exception is keeping a small emergency buffer, so an unexpected cost does not push you straight back onto the card.</p><h3>Is my balance information stored?</h3><p>No. The calculation runs entirely in your browser and nothing about your debt is transmitted or saved.</p>"
  },
  "heart-rate-zones": {
    "title": "Heart Rate Zone Calculator — Karvonen Method, Done Properly",
    "description": "Calculate your five training zones from maximum and resting heart rate using the Karvonen reserve method, and see why the 220-minus-age rule is off by ten beats for most people.",
    "keywords": "heart rate zone calculator, karvonen formula, maximum heart rate, heart rate reserve, zone 2 training, tanaka formula, 220 minus age",
    "article": "<h1>Three ways to estimate maximum heart rate, none of them exact</h1><p>Every zone calculation starts from an estimate of your maximum heart rate, and this is where most of the error enters. The three formulas in common use disagree, and all three are population averages:</p><table><tr><th>Formula</th><th>Equation</th><th>At age 35</th></tr><tr><td>Fox, 1971</td><td>220 − age</td><td>185</td></tr><tr><td>Tanaka, 2001</td><td>208 − 0.7 × age</td><td>184</td></tr><tr><td>Gellish, 2007</td><td>207 − 0.7 × age</td><td>183</td></tr></table><p>The familiar 220 − age has no original research behind it — it was an informal fit to scattered data and was never validated. More importantly, its <strong>standard deviation is about 10 to 12 beats per minute</strong>. That means roughly a third of people have a true maximum more than 10 beats away from the estimate, and some are off by 20. Tanaka, derived from a large meta-analysis, is more accurate on average and notably better for people over 40, where 220 − age tends to underestimate.</p><p>The only reliable way to know your maximum is to measure it in a supervised graded exercise test, or to observe the highest value you have genuinely reached during an all-out effort. If you have such a number, use it and ignore the formulas.</p><h2>Karvonen: use the reserve, not the maximum</h2><p>Two people with the same maximum heart rate but resting rates of 45 and 75 are not working equally hard at 140 beats. The Karvonen method fixes this by working from <strong>heart rate reserve</strong> — the span between rest and maximum:</p><p><code>Target = resting HR + (intensity % × (max HR − resting HR))</code></p><h2>The worked example</h2><p>Age 35, resting heart rate 60, using the Tanaka estimate of 184. Heart rate reserve is 184 − 60 = <strong>124 beats</strong>.</p><table><tr><th>Zone</th><th>% of reserve</th><th>Beats per minute</th><th>What it is for</th></tr><tr><td>1 — Recovery</td><td>50 to 60%</td><td>122 to 134</td><td>Warm-up, cool-down, active recovery days</td></tr><tr><td>2 — Aerobic base</td><td>60 to 70%</td><td>134 to 147</td><td>Fat oxidation, mitochondrial density, the bulk of endurance volume</td></tr><tr><td>3 — Tempo</td><td>70 to 80%</td><td>147 to 159</td><td>Sustained moderate effort, aerobic capacity</td></tr><tr><td>4 — Threshold</td><td>80 to 90%</td><td>159 to 172</td><td>Lactate threshold work, race pace intervals</td></tr><tr><td>5 — Maximum</td><td>90 to 100%</td><td>172 to 184</td><td>Short intervals, VO2 max development</td></tr></table><h2>Why the two methods give very different zone 2</h2><p>This trips up a lot of people comparing numbers with a friend or a watch. The simpler percentage-of-maximum method would put 70% at 0.70 × 184 = <strong>129 beats</strong>. Karvonen puts 70% of reserve at <strong>147 beats</strong> — eighteen beats higher. Neither is wrong; they are different definitions of the same percentage. If a plan tells you to train at 70%, it matters enormously which method it means. Karvonen is generally preferred because it individualises for fitness, and a well-trained person with a resting rate of 45 gets appropriately different targets from a beginner at 80.</p><h2>Zone 2 is where most people go wrong</h2><p>The most common training error is spending nearly all sessions in zone 3 — hard enough to be tiring, not hard enough to drive high-intensity adaptation, and too hard to accumulate real aerobic volume. Endurance athletes across sports converge on roughly <strong>80% of training time in zones 1 and 2</strong> with 20% in zones 4 and 5. Zone 2 should feel almost too easy: you can hold a full conversation. If you are breathing in short phrases, you have drifted into zone 3.</p><h2>What can shift your heart rate on any given day</h2><p>Heart rate is a signal about your whole physiological state, not just your effort. Expect it to move by 5 to 15 beats for reasons that have nothing to do with fitness:</p><ul><li><strong>Heat and humidity.</strong> Cardiac drift upward at the same pace is normal and can add 10 or more beats late in a hot session.</li><li><strong>Dehydration.</strong> Lower plasma volume means a higher rate for the same output.</li><li><strong>Caffeine, poor sleep, illness, stress.</strong> All raise it. A resting rate 8 or more beats above your normal is a reasonable signal to take an easy day.</li><li><strong>Medication.</strong> Beta blockers lower both resting and maximum heart rate substantially, which makes every formula on this page inapplicable.</li></ul><h2>Honest limits</h2><p>These zones are built on an age-based population estimate with a known error of around 10 beats, then divided into bands whose boundaries are conventions rather than measured physiological thresholds. Your actual lactate threshold might sit anywhere in zone 3 or 4. Chest-strap monitors are reliable; wrist optical sensors lag during rapid changes and can lock onto cadence instead of pulse during running, producing convincingly wrong data. If you take heart medication, have a diagnosed cardiac condition, or are new to intense exercise after a long gap, get clearance from a clinician before training at zones 4 and 5. This page is general information, not medical advice.</p><h2>Questions people actually ask</h2><h3>How do I measure my resting heart rate properly?</h3><p>Immediately on waking, before getting out of bed or looking at a phone, counted over a full 60 seconds — or read the overnight low from a wearable. Take an average across several mornings rather than one reading.</p><h3>My watch zones do not match these numbers. Which is right?</h3><p>Check which method your watch uses. Many default to percentage of maximum, and many still use 220 − age. Most let you enter a measured maximum and switch to the reserve method, which is worth doing.</p><h3>Is a high maximum heart rate a sign of fitness?</h3><p>No. Maximum heart rate is largely genetic and declines with age regardless of training. Fitness shows up as a <em>lower resting</em> rate, faster recovery after effort, and more speed at the same heart rate.</p><h3>Is my data stored?</h3><p>No. Your age and resting rate are used only in your browser to compute the zones; nothing is transmitted or saved.</p>"
  },
  "timestamp-converter": {
    "title": "Unix Timestamp Converter — Epoch Time, Milliseconds and the 2038 Problem",
    "description": "Convert Unix epoch timestamps to readable dates and back, tell seconds from milliseconds at a glance, and understand leap seconds, ISO 8601 and the 2038 overflow.",
    "keywords": "unix timestamp converter, epoch time converter, milliseconds to date, iso 8601, year 2038 problem, utc timestamp, leap seconds unix time",
    "article": "<h1>Timestamp Converter: Unix Epoch, ISO 8601, and the Timezone Problem</h1>\n<p>A Unix timestamp is the number of seconds (or milliseconds) since January 1, 1970, 00:00:00 UTC — the \"epoch.\" It is the universal time format in computing: databases, APIs, log files, and programming languages all use it internally. The timestamp converter translates between this machine-readable number and human-readable date formats.</p>\n<h2>Common timestamp formats</h2>\n<table><tr><th>Format</th><th>Example</th><th>Used by</th></tr>\n<tr><td>Unix seconds</td><td>1695225600</td><td>C, Python, PHP, Unix systems</td></tr>\n<tr><td>Unix milliseconds</td><td>1695225600000</td><td>JavaScript, Java, Dart</td></tr>\n<tr><td>ISO 8601</td><td>2023-09-20T16:00:00Z</td><td>APIs, JSON, XML, databases</td></tr>\n<tr><td>RFC 2822</td><td>Wed, 20 Sep 2023 16:00:00 +0000</td><td>Email headers, HTTP headers</td></tr>\n<tr><td>Human readable</td><td>September 20, 2023, 4:00 PM UTC</td><td>User interfaces</td></tr></table>\n<h2>Why Unix timestamps exist</h2>\n<p>Human-readable dates are ambiguous. \"01/02/03\" is January 2 in the US, February 1 in Europe, and February 3 in Japan. \"Next Tuesday\" depends on when you say it. A Unix timestamp is unambiguous: 1695225600 means exactly one moment in time, everywhere in the world, in every programming language. All localisation (timezone, date format, language) happens at the display layer.</p>\n<h2>The Year 2038 Problem</h2>\n<p>Unix timestamps stored as 32-bit signed integers overflow on January 19, 2038, at 03:14:07 UTC. After this moment, a 32-bit timestamp wraps around to a negative number representing December 13, 1901. Modern systems use 64-bit timestamps (which overflow in the year 292,277,026,596 — effectively never), but legacy embedded systems, IoT devices, and older databases remain vulnerable. The 2038 problem is Y2K's less famous successor.</p>\n<h2>Timezone conversion</h2>\n<p>Unix timestamps are always in UTC. Converting to local time requires knowing the timezone offset and whether Daylight Saving Time (DST) is active. This is harder than it sounds:</p>\n<table><tr><th>Timezone</th><th>UTC offset (standard)</th><th>UTC offset (DST)</th></tr>\n<tr><td>US Eastern (ET)</td><td>UTC−5</td><td>UTC−4</td></tr>\n<tr><td>US Pacific (PT)</td><td>UTC−8</td><td>UTC−7</td></tr>\n<tr><td>Central European (CET)</td><td>UTC+1</td><td>UTC+2</td></tr>\n<tr><td>India (IST)</td><td>UTC+5:30</td><td>No DST</td></tr>\n<tr><td>Japan (JST)</td><td>UTC+9</td><td>No DST</td></tr>\n<tr><td>Australia Eastern (AEST)</td><td>UTC+10</td><td>UTC+11</td></tr></table>\n<p>DST transitions are not globally consistent: the US changes clocks in March/November; Europe changes in March/October; most of Africa and Asia do not observe DST at all. The IANA timezone database (tzdata) tracks these rules and is updated multiple times per year as governments change DST policies.</p>\n<h2>Milliseconds vs. seconds</h2>\n<p>JavaScript's <code>Date.now()</code> returns milliseconds; Python's <code>time.time()</code> returns seconds with decimal fractions; databases vary. The converter auto-detects: if the number has 13 digits, it's milliseconds; 10 digits, it's seconds. Getting this wrong produces dates in the year 53,000 or 1970 — a common debugging headache.</p>\n<h2>FAQ</h2>\n<p><strong>What is the current Unix timestamp?</strong><br>The converter shows the live current timestamp, updated every second. As of this writing, we are past timestamp 1,750,000,000 (reached June 2025).</p>\n<p><strong>Can timestamps be negative?</strong><br>Yes — negative timestamps represent dates before the epoch (January 1, 1970). Timestamp −86400 is December 31, 1969. Most systems support this, but some JavaScript environments and databases do not handle negative timestamps correctly.</p>\n<p><strong>Why does my API return timestamps in milliseconds?</strong><br>JavaScript convention. Since JavaScript is the dominant language for web APIs and its Date object uses milliseconds internally, many APIs follow suit. Always check the API documentation to confirm the unit.</p>"
  },
  "number-base-converter": {
    "title": "Number Base Converter — Binary, Octal, Decimal and Hexadecimal",
    "description": "Convert between binary, octal, decimal and hex, with the repeated-division method worked through, the nibble shortcut, and why hex exists at all.",
    "keywords": "number base converter, decimal to binary, decimal to hex, binary to hex, octal converter, base conversion method, twos complement",
    "article": "<h1>Number Base Converter: Binary, Octal, Decimal, Hex, and Custom Bases Explained</h1>\n<p>A number base (or radix) is the number of unique digits used to represent values. Decimal uses 10 digits (0–9), binary uses 2 (0, 1), octal uses 8 (0–7), and hexadecimal uses 16 (0–9, A–F). Converting between bases is fundamental to computing, networking, and digital electronics — and the algorithm is the same regardless of the bases involved.</p>\n<h2>The bases you will encounter</h2>\n<table><tr><th>Base</th><th>Name</th><th>Digits</th><th>Primary use</th></tr>\n<tr><td>2</td><td>Binary</td><td>0, 1</td><td>CPU operations, digital logic</td></tr>\n<tr><td>8</td><td>Octal</td><td>0–7</td><td>Unix file permissions (chmod 755)</td></tr>\n<tr><td>10</td><td>Decimal</td><td>0–9</td><td>Human arithmetic, finance</td></tr>\n<tr><td>16</td><td>Hexadecimal</td><td>0–9, A–F</td><td>Memory addresses, colours (#FF5733), MAC addresses</td></tr>\n<tr><td>32</td><td>Base32</td><td>A–Z, 2–7</td><td>Encoding (TOTP codes, Crockford encoding)</td></tr>\n<tr><td>64</td><td>Base64</td><td>A–Z, a–z, 0–9, +, /</td><td>Email attachments, data URIs, JWT tokens</td></tr></table>\n<h2>Conversion algorithm: any base to any base</h2>\n<p>All conversions go through base 10 as an intermediate step:</p>\n<ol>\n<li><strong>Source → Decimal:</strong> Multiply each digit by its positional power of the source base, then sum. Example: binary 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal.</li>\n<li><strong>Decimal → Target:</strong> Repeatedly divide by the target base and collect remainders. Example: 11 ÷ 16 = 0 remainder 11 (= B in hex). Result: 0xB.</li>\n</ol>\n<h2>Quick reference table</h2>\n<table><tr><th>Decimal</th><th>Binary</th><th>Octal</th><th>Hex</th></tr>\n<tr><td>0</td><td>0000</td><td>0</td><td>0</td></tr>\n<tr><td>5</td><td>0101</td><td>5</td><td>5</td></tr>\n<tr><td>10</td><td>1010</td><td>12</td><td>A</td></tr>\n<tr><td>15</td><td>1111</td><td>17</td><td>F</td></tr>\n<tr><td>16</td><td>10000</td><td>20</td><td>10</td></tr>\n<tr><td>255</td><td>11111111</td><td>377</td><td>FF</td></tr>\n<tr><td>256</td><td>100000000</td><td>400</td><td>100</td></tr></table>\n<h2>Why hex is used for colours</h2>\n<p>CSS colours like #FF5733 encode three 8-bit channels (Red, Green, Blue) as two hex digits each. FF = 255 (maximum red), 57 = 87 (moderate green), 33 = 51 (low blue). Hex is used because it maps directly to the 8-bit byte: one byte = 2 hex digits = 8 binary digits. Reading \"FF\" is faster than reading \"11111111\" and more compact than reading \"255\".</p>\n<h2>Binary in networking</h2>\n<p>IP addresses (IPv4) are 32-bit binary numbers displayed in dotted decimal for readability. 192.168.1.1 is actually 11000000.10101000.00000001.00000001 in binary. Subnet masks are binary patterns that determine which bits identify the network and which identify the host. Understanding binary is essential for network configuration, CIDR notation, and troubleshooting.</p>\n<h2>FAQ</h2>\n<p><strong>What is the difference between 0x and 0b prefixes?</strong><br>0x denotes hexadecimal (0xFF = 255), 0b denotes binary (0b11111111 = 255), and 0o denotes octal (0o377 = 255) in most programming languages. These prefixes prevent ambiguity — \"10\" means ten in decimal, two in binary, eight in octal, or sixteen in hex.</p>\n<p><strong>Can I convert fractions?</strong><br>Yes, but fractional conversion can produce repeating patterns. 0.1 in decimal is 0.000110011... in binary (repeating), which is why floating-point arithmetic sometimes produces unexpected results like 0.1 + 0.2 = 0.30000000000000004.</p>\n<p><strong>What is base36?</strong><br>Base36 uses 0–9 and A–Z (36 characters) and is used for URL shorteners and compact identifiers because it packs the most information per character using only alphanumeric characters.</p>"
  },
  "prime-checker": {
    "title": "Prime Number Checker — Test Any Number and See the Factors",
    "description": "Check whether a number is prime using trial division up to its square root, with worked examples, quick divisibility tests, and why 1 is deliberately excluded.",
    "keywords": "prime number checker, is this number prime, trial division, prime factorisation, why 1 is not prime, mersenne prime, divisibility rules",
    "article": "<h1>Prime Number Checker: The Algorithm, the Theory, and Why Primes Matter</h1>\n<p>A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. The concept is elementary; the implications reach into cryptography, computer science, and one of the oldest unsolved problems in mathematics. This tool checks whether a given number is prime, lists its factors if it is not, and explains the algorithm used.</p>\n<h2>The checking algorithm</h2>\n<p>Trial division up to √n: divide n by every integer from 2 to √n. If any division produces zero remainder, n is composite. If none do, n is prime.</p>\n<table><tr><th>Number</th><th>Divisions tested</th><th>Result</th></tr>\n<tr><td>17</td><td>17 ÷ 2, ÷ 3, ÷ 4 (√17 ≈ 4.1)</td><td>Prime</td></tr>\n<tr><td>51</td><td>51 ÷ 2, ÷ 3 = 17 → remainder 0</td><td>Composite (3 × 17)</td></tr>\n<tr><td>97</td><td>97 ÷ 2 through ÷ 9 (√97 ≈ 9.8)</td><td>Prime</td></tr>\n<tr><td>1,000,003</td><td>÷ 2 through ÷ 1000</td><td>Prime</td></tr></table>\n<p>Time complexity: O(√n). For numbers up to 10^12, this completes in milliseconds. For larger numbers, probabilistic tests (Miller-Rabin) are used instead.</p>\n<h2>The first 50 primes</h2>\n<p>2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229.</p>\n<h2>Why primes matter in cryptography</h2>\n<p>RSA encryption — the algorithm that secures most internet commerce — relies on the fact that multiplying two large primes is easy but factoring the product is computationally infeasible. A 2048-bit RSA key uses two primes of approximately 300 digits each. Their product (the public key) can be freely shared; recovering the original primes (needed for the private key) would take billions of years with current technology.</p>\n<h2>Famous unsolved problems</h2>\n<table><tr><th>Problem</th><th>Statement</th><th>Status</th></tr>\n<tr><td>Twin Prime Conjecture</td><td>There are infinitely many pairs of primes that differ by 2 (e.g., 11 and 13)</td><td>Unproven (Yitang Zhang proved a finite gap in 2013)</td></tr>\n<tr><td>Goldbach's Conjecture</td><td>Every even integer > 2 is the sum of two primes</td><td>Verified up to 4×10^18; no proof</td></tr>\n<tr><td>Riemann Hypothesis</td><td>All non-trivial zeros of the zeta function have real part 1/2</td><td>Unproven; $1 million Millennium Prize</td></tr></table>\n<h2>Special prime types</h2>\n<table><tr><th>Type</th><th>Definition</th><th>Example</th></tr>\n<tr><td>Mersenne prime</td><td>2^p − 1 where p is prime</td><td>2^31 − 1 = 2,147,483,647</td></tr>\n<tr><td>Twin primes</td><td>p and p+2 both prime</td><td>(41, 43)</td></tr>\n<tr><td>Sophie Germain prime</td><td>p where 2p+1 is also prime</td><td>23 (2×23+1 = 47 is prime)</td></tr>\n<tr><td>Palindromic prime</td><td>Prime that reads same forwards and backwards</td><td>131, 787, 11311</td></tr></table>\n<h2>FAQ</h2>\n<p><strong>Is 1 a prime number?</strong><br>No. By modern convention (since the early 20th century), 1 is excluded from the primes. This simplifies the Fundamental Theorem of Arithmetic, which states that every integer > 1 has a unique prime factorisation.</p>\n<p><strong>Is 2 the only even prime?</strong><br>Yes. Every even number > 2 is divisible by 2, so 2 is the only even prime — and also the smallest prime.</p>\n<p><strong>How large is the largest known prime?</strong><br>As of 2024, the largest known prime is 2^82,589,933 − 1, a Mersenne prime with 24,862,048 digits. It was discovered by the Great Internet Mersenne Prime Search (GIMPS), a distributed computing project.</p>"
  },
  "gcd-lcm": {
    "title": "GCD and LCM Calculator — Euclid Algorithm With Worked Examples",
    "description": "Find the greatest common divisor and lowest common multiple of any numbers, using Euclid algorithm and prime factorisation, plus the identity that links the two.",
    "keywords": "gcd calculator, lcm calculator, euclid algorithm, greatest common divisor, lowest common multiple, simplify fractions, hcf calculator",
    "article": "<h1>GCD and LCM Calculator: The Algorithms, the Proofs, and the Applications</h1>\n<p>The Greatest Common Divisor (GCD) and Least Common Multiple (LCM) are the two most fundamental operations in number theory. GCD(a, b) is the largest positive integer that divides both a and b without remainder. LCM(a, b) is the smallest positive integer that both a and b divide into without remainder. Together, they appear in fraction arithmetic, gear ratios, scheduling problems, cryptography, and computer science.</p>\n<h2>The relationship between GCD and LCM</h2>\n<p><code>GCD(a, b) × LCM(a, b) = a × b</code></p>\n<p>This identity means you only need to compute one to get the other: <code>LCM(a, b) = a × b / GCD(a, b)</code>. Since GCD is faster to compute (using Euclid's algorithm), this is how every calculator derives LCM in practice.</p>\n<h2>Euclid's algorithm (c. 300 BC)</h2>\n<p>The oldest known algorithm still in daily use. The idea: GCD(a, b) = GCD(b, a mod b), repeated until the remainder is zero. The last non-zero remainder is the GCD.</p>\n<table>\n<tr><th>Step</th><th>a</th><th>b</th><th>a mod b</th></tr>\n<tr><td>1</td><td>252</td><td>105</td><td>42</td></tr>\n<tr><td>2</td><td>105</td><td>42</td><td>21</td></tr>\n<tr><td>3</td><td>42</td><td>21</td><td>0</td></tr>\n</table>\n<p>GCD(252, 105) = 21. The algorithm runs in O(log(min(a, b))) time, making it efficient even for very large numbers — including the 2048-bit integers used in RSA encryption.</p>\n<h2>Prime factorisation method</h2>\n<table>\n<tr><th>Number</th><th>Prime factors</th></tr>\n<tr><td>252</td><td>2² × 3² × 7</td></tr>\n<tr><td>105</td><td>3 × 5 × 7</td></tr>\n<tr><td>GCD</td><td>3¹ × 7¹ = 21 (take minimum exponents)</td></tr>\n<tr><td>LCM</td><td>2² × 3² × 5 × 7 = 1260 (take maximum exponents)</td></tr>\n</table>\n<p>This method is intuitive and useful for teaching, but impractical for large numbers because prime factorisation is computationally expensive (no known polynomial-time algorithm for general integers, which is the basis of RSA security).</p>\n<h2>Real-world applications</h2>\n<p><strong>Fraction simplification:</strong> To simplify 252/105, divide both by GCD(252, 105) = 21, yielding 12/5. Every fraction-simplification operation implicitly computes a GCD.</p>\n<p><strong>Scheduling problems:</strong> Two events recur every 12 and 18 days. When do they next coincide? LCM(12, 18) = 36 days. This extends to bus schedules, maintenance cycles, and production line synchronisation.</p>\n<p><strong>Gear ratios:</strong> A gear with 42 teeth meshing with a gear with 28 teeth has a ratio of 42:28 = 3:2 (simplified by GCD = 14). The LCM determines how many rotations before the same teeth re-engage — critical for wear distribution.</p>\n<p><strong>Cryptography:</strong> RSA key generation uses Euler's totient function, which relies on GCD. The extended Euclidean algorithm computes modular inverses needed for decryption.</p>\n<p><strong>Music and rhythm:</strong> A polyrhythm of 3 against 4 repeats every LCM(3, 4) = 12 beats. African drumming and progressive rock exploit polyrhythmic patterns extensively.</p>\n<h2>GCD of more than two numbers</h2>\n<p>GCD is associative: GCD(a, b, c) = GCD(GCD(a, b), c). This allows chaining for any number of inputs. The same applies to LCM.</p>\n<h2>Edge cases</h2>\n<p>GCD(0, n) = n (by convention). GCD(0, 0) is undefined (every integer divides 0). LCM(0, n) = 0 (by convention in most implementations). Negative numbers: GCD is always positive; use absolute values.</p>\n<h2>FAQ</h2>\n<p><strong>What is the difference between GCD and HCF?</strong><br>They are the same thing. HCF (Highest Common Factor) is the term used in British and Indian mathematics education; GCD (Greatest Common Divisor) is the American and international standard.</p>\n<p><strong>Can GCD be computed for non-integers?</strong><br>Not directly. GCD is defined for integers. For rational numbers, you can compute GCD of the numerators after finding a common denominator, but this is uncommon outside specialised mathematics.</p>\n<p><strong>Why is Euclid's algorithm so fast?</strong><br>Each step reduces the larger number by at least half (a mod b < a/2 when a > b). This guarantees logarithmic convergence — even for numbers with thousands of digits, the algorithm completes in milliseconds.</p>"
  },
  "ratio-calculator": {
    "title": "Ratio Calculator — Solve, Simplify and Scale Any Ratio",
    "description": "Solve for a missing term in a proportion, simplify ratios to lowest form, scale recipes and mixes, and avoid the part-to-part versus part-to-whole mistake.",
    "keywords": "ratio calculator, solve proportion, simplify ratio, aspect ratio calculator, scale a recipe, part to whole ratio, mix ratio calculator",
    "article": "<h1>Ratio Calculator: Simplification, Scaling, and the Geometry Behind Proportions</h1>\n<p>A ratio expresses the relative size of two or more quantities. 3:2 means that for every 3 units of the first quantity, there are 2 of the second. Ratios appear in cooking recipes, aspect ratios, financial analysis, map scales, and probability — and simplifying or scaling them is one of the most common mathematical operations in daily life.</p>\n<h2>Core operations</h2>\n<table><tr><th>Operation</th><th>Input</th><th>Output</th><th>Method</th></tr>\n<tr><td>Simplify</td><td>12:8</td><td>3:2</td><td>Divide both by GCD (4)</td></tr>\n<tr><td>Scale up</td><td>3:2, scale to 15</td><td>15:10</td><td>Multiply both by 5</td></tr>\n<tr><td>Find missing value</td><td>3:2 = ?:10</td><td>15:10</td><td>Cross-multiply: ? = 3×10/2 = 15</td></tr>\n<tr><td>Convert to fraction</td><td>3:2</td><td>3/2 or 1.5</td><td>Divide first by second</td></tr>\n<tr><td>Convert to percentage</td><td>3:2 (of total)</td><td>60%:40%</td><td>Each part ÷ sum × 100</td></tr></table>\n<h2>Common ratios and where they appear</h2>\n<table><tr><th>Ratio</th><th>Context</th></tr>\n<tr><td>16:9</td><td>Widescreen video and monitor aspect ratio</td></tr>\n<tr><td>4:3</td><td>Traditional TV and iPad aspect ratio</td></tr>\n<tr><td>1:1.618</td><td>Golden ratio (φ), used in design and architecture</td></tr>\n<tr><td>3:1</td><td>Concrete mix (cement : sand : gravel = 1:2:3 → water:cement ≈ 0.5:1)</td></tr>\n<tr><td>1:50,000</td><td>Topographic map scale (1 cm = 500 m)</td></tr>\n<tr><td>2:1</td><td>Standard cocktail spirit-to-mixer ratio</td></tr></table>\n<h2>Aspect ratios in detail</h2>\n<p>Screen aspect ratios define the width-to-height relationship. A 16:9 screen with a width of 1920 pixels has a height of 1920 × 9/16 = 1080 pixels (Full HD). A 21:9 ultrawide at 3440 pixels wide has a height of 3440 × 9/21 = 1474 pixels (approximately 1440). When you resize images or videos, maintaining the aspect ratio prevents distortion — scale both dimensions by the same factor.</p>\n<h2>Ratios in cooking</h2>\n<p>Professional bakers express recipes as ratios rather than absolute quantities because ratios scale linearly. A basic bread dough is flour:water:salt:yeast = 100:65:2:1 (by weight). To make twice as much, double every number. This is why baking by weight is more reliable than baking by volume — ratios preserve the chemistry regardless of batch size.</p>\n<h2>Financial ratios</h2>\n<p>Investors use dozens of ratios to evaluate companies: P/E (price-to-earnings), debt-to-equity, current ratio (current assets / current liabilities). A P/E of 15:1 means investors pay $15 for every $1 of earnings. These ratios are only meaningful in context — a P/E of 30 is expensive for a utility company but normal for a high-growth tech company.</p>\n<h2>The golden ratio</h2>\n<p>The golden ratio (φ ≈ 1.618) appears in nature (sunflower seed spirals, nautilus shells), art (Parthenon proportions), and design (Apple's logo geometry). Whether its aesthetic properties are real or a confirmation bias is debated, but designers frequently use it for layout proportions: sidebar width = content width / 1.618.</p>\n<h2>FAQ</h2>\n<p><strong>Is 3:2 the same as 2:3?</strong><br>No. Order matters. 3:2 means the first quantity is larger; 2:3 means the second is larger. When expressing ratios, maintain a consistent convention (e.g., width:height for screens).</p>\n<p><strong>Can ratios have more than two terms?</strong><br>Yes. Concrete mix is expressed as 1:2:3 (cement:sand:gravel). Simplification divides all terms by their common GCD.</p>\n<p><strong>How do I convert a ratio to a decimal?</strong><br>Divide the first number by the second. 3:2 = 3/2 = 1.5. For multi-term ratios, express each term as a fraction of the total: 1:2:3 totals 6, so the parts are 1/6, 2/6, 3/6 (≈ 16.7%, 33.3%, 50.0%).</p>"
  },
  "life-in-weeks": {
    "title": "Life in Weeks — See Your Whole Life as a Grid",
    "description": "Convert your age into weeks lived and weeks remaining, and see why weeks are the unit that actually changes how people think about time.",
    "keywords": "life in weeks, life calendar, weeks lived calculator, life expectancy weeks, memento mori calculator, weeks remaining, age in weeks",
    "article": "<h1>The arithmetic, and why weeks</h1><p>A year contains 52.1786 weeks — that is 365.25 days divided by 7. So a 90-year life is <strong>4,696 weeks</strong>, and someone who has just turned 35 has lived <strong>1,826</strong> of them, with roughly <strong>2,870</strong> left if they reach 90.</p><p>The reason to use weeks rather than years is that they are small enough to feel countable and large enough to matter. Nobody has an intuition for 19,710 days. But 4,696 boxes fits on one sheet of paper, and 2,870 remaining feels like a finite quantity in a way that 55 years does not. The unit is doing the work here, not the maths.</p><table><tr><th>Age now</th><th>Weeks lived</th><th>Weeks to 80</th><th>Weeks to 90</th></tr><tr><td>20</td><td>1,044</td><td>3,131</td><td>3,653</td></tr><tr><td>30</td><td>1,565</td><td>2,609</td><td>3,131</td></tr><tr><td>40</td><td>2,087</td><td>2,087</td><td>2,609</td></tr><tr><td>50</td><td>2,609</td><td>1,565</td><td>2,087</td></tr><tr><td>60</td><td>3,131</td><td>1,044</td><td>1,565</td></tr><tr><td>70</td><td>3,653</td><td>522</td><td>1,044</td></tr></table><h2>The version of this that actually changes behaviour</h2><p>Total weeks remaining is interesting once. The figures that tend to land harder are the ones scoped to a specific relationship or activity, because those clocks run out long before your own does:</p><ul><li><strong>Weeks with a child at home.</strong> If your child is 8 and will leave at 18, that is about <strong>520 weeks</strong> — and a large share are school days. Framed as ten years it sounds open-ended; framed as 520 Saturdays it does not.</li><li><strong>Visits with ageing parents.</strong> If you see them twice a year and they are 70, the honest arithmetic is perhaps 30 more visits, not 15 more years.</li><li><strong>Summers.</strong> If you are 35 and count to 80, that is 45 more summers. Most people guess higher before they calculate.</li><li><strong>Books, or anything with a fixed rate.</strong> Twenty books a year for 45 years is 900 books. That is your whole remaining reading life, and it makes the choice of what to read next a real decision.</li></ul><p>This is the genuine use of the calculation. It does not add time; it makes the allocation visible.</p><h2>Where the 90 comes from, and why it is not a prediction</h2><p>The number this tool projects to is a placeholder, not a forecast, and it is worth being clear about the gap. Global average life expectancy at birth is around 73 years, but the spread by country is enormous — roughly 84 in Japan, 81 in Western Europe, 79 in the United States, 67 in Pakistan. Within any country, differences by income, education and postcode routinely run to a decade.</p><p>Three technical caveats that most life-expectancy content skips:</p><ul><li><strong>Life expectancy at birth is not your life expectancy.</strong> It is an average dragged down by deaths at every younger age. Once you have reached 60, your expected remaining years are higher than the birth figure implies — conditional survival works in your favour.</li><li><strong>It is a period measure, not a cohort one.</strong> Published figures assume today mortality rates hold forever. If medicine keeps improving, actual cohorts outlive their projection.</li><li><strong>It is a mean, not a promise.</strong> The distribution is wide and skewed. Roughly half of people outlive the average, and individual variation dwarfs anything a calculator can model.</li></ul><p>None of this is medical or actuarial advice. Choose a number you find useful to think against — 80, 90, 100 — and treat the grid as a framing device rather than a countdown.</p><h2>What this framing gets wrong if you take it too literally</h2><p>Two honest criticisms of the whole life-in-weeks genre, which is usually presented without them.</p><p>First, it can produce anxiety rather than clarity. Seeing thousands of filled boxes provokes a sense of waste in people who have not wasted anything. Weeks spent recovering from illness, raising small children, or simply resting are not lost weeks, but a grid renders them identically to any other.</p><p>Second, it implies every week is equally available and equally valuable. They are not. A week at 35 with a mortgage and a job is not interchangeable with a week at 22 or a week at 70. Optimising for the count misses that.</p><p>The framing works best as an occasional recalibration — a reason to make one specific decision differently — and worst as a daily metric.</p><h2>Questions people actually ask</h2><h3>Why 52.1786 rather than 52?</h3><p>Because 52 × 7 is 364, so using a flat 52 loses more than a day a year and drifts by over a month across a lifetime. The 0.1786 accounts for the extra day plus leap years.</p><h3>Where did the idea come from?</h3><p>It circulated widely after Tim Urban published a life-in-weeks grid on Wait But Why, though the underlying idea is much older — <em>memento mori</em> as a deliberate practice goes back to Stoic philosophy, and Psalm 90 asks to be taught to number one days.</p><h3>Should I print it?</h3><p>Many people do, and mark one box a week. The physical version seems to work better than a screen, probably because it stays visible without being refreshed. Whether that is motivating or oppressive is personal — try it for a month before committing to a wall.</p><h3>Is my date of birth stored?</h3><p>No. Your date is used only in your browser to compute the numbers, and nothing is transmitted or saved.</p>"
  },
  "year-progress": {
    "title": "Year Progress — How Far Through the Year You Actually Are",
    "description": "See the exact percentage of the year completed, with the day-of-year calculation worked through, leap year rules, and quarter and fiscal-year boundaries.",
    "keywords": "year progress, percentage of year completed, day of year calculator, days left in year, leap year rule, quarter progress, iso week number",
    "article": "<h1>Year Progress Bar: A Visual Reminder That Time Is Passing</h1>\n<p>The year progress bar shows what percentage of the current year has elapsed. On July 1st, it reads approximately 50%. On December 31st, 99.7%. The concept was popularised by the @year_progress Twitter bot (now 7.5 million followers) and has become a cultural touchstone for temporal awareness — a simple visual that provokes a surprisingly strong emotional response.</p>\n<h2>How it is calculated</h2>\n<p><code>Year Progress = (Day of Year / Total Days in Year) × 100</code></p>\n<table><tr><th>Date</th><th>Day of year</th><th>Progress (non-leap)</th></tr>\n<tr><td>January 31</td><td>31</td><td>8.5%</td></tr>\n<tr><td>March 31</td><td>90</td><td>24.7%</td></tr>\n<tr><td>June 30</td><td>181</td><td>49.6%</td></tr>\n<tr><td>September 30</td><td>273</td><td>74.8%</td></tr>\n<tr><td>December 31</td><td>365</td><td>100.0%</td></tr></table>\n<h2>Why this number feels different</h2>\n<p>Psychologists identify the \"end-of-history illusion\" — people acknowledge that they have changed significantly in the past but predict that they will change relatively little in the future. The year progress bar is a corrective: it makes the passage of time visceral and immediate, countering the default assumption that \"there's plenty of time.\"</p>\n<h2>Time perception research</h2>\n<p>The subjective speed of time changes with age. A widely cited proportional theory (attributed to Paul Janet, 1897) notes that each year is a smaller fraction of your total life experience as you age: a year is 10% of a 10-year-old's life but only 2% of a 50-year-old's. More recent research suggests that the effect is driven by the ratio of novel to familiar experiences — years filled with new experiences feel longer in retrospect, while routine years feel like they passed instantly.</p>\n<h2>Using the year progress bar productively</h2>\n<p><strong>Annual goal tracking:</strong> If your year progress is at 50% but your goal progress is at 20%, the gap is visible and actionable. Pair the year progress bar with specific, measurable goals to convert temporal awareness into behavioural change.</p>\n<p><strong>Budget pacing:</strong> At 50% year progress, you should have approximately 50% of your annual budget remaining. Significant deviation in either direction indicates overspending or underspending relative to plan.</p>\n<p><strong>Project management:</strong> If a 12-month project is at 75% year progress but only 40% complete, the schedule risk is concrete and communicable. The progress bar makes abstract timeline gaps tangible for stakeholders.</p>\n<h2>Quarterly and monthly milestones</h2>\n<table><tr><th>Milestone</th><th>Date</th><th>Year %</th></tr>\n<tr><td>Q1 ends</td><td>March 31</td><td>24.7%</td></tr>\n<tr><td>Q2 ends</td><td>June 30</td><td>49.6%</td></tr>\n<tr><td>Q3 ends</td><td>September 30</td><td>74.8%</td></tr>\n<tr><td>Q4 ends</td><td>December 31</td><td>100%</td></tr>\n<tr><td>100 days left</td><td>September 22</td><td>72.6%</td></tr>\n<tr><td>Half year</td><td>July 2 (noon)</td><td>50.0%</td></tr></table>\n<h2>The cultural impact</h2>\n<p>The @year_progress bot's tweets consistently reach millions of impressions. When the bar crosses 25%, 50%, 75%, and 90%, the replies fill with expressions of shock, motivation, and existential reflection. The bar has become a meme format — people create personal progress bars, project progress bars, and satirical \"adulthood progress\" bars. Its power lies in its simplicity: a single number that requires no context to understand.</p>\n<h2>FAQ</h2>\n<p><strong>Does the progress bar account for leap years?</strong><br>Yes. In leap years (366 days), each day represents 0.273% instead of 0.274%. The difference is negligible for display purposes but is handled correctly in the calculation.</p>\n<p><strong>Can I set custom start and end dates?</strong><br>The year progress bar uses January 1 to December 31. For fiscal years, academic years, or project timelines, adjust the start date in the tool settings.</p>\n<p><strong>Is there a psychological benefit to tracking year progress?</strong><br>Research on implementation intentions (Gollwitzer, 1999) shows that people who monitor progress toward goals are significantly more likely to achieve them. The year progress bar is a low-friction monitoring tool that requires no manual input.</p>"
  },
  "days-until": {
    "title": "Days Until — Countdown to Any Date, Including Working Days",
    "description": "Count the days to any future date, see how many are working days, and avoid the inclusive-counting mistake that makes every countdown off by one.",
    "keywords": "days until calculator, countdown to date, working days between dates, business days calculator, days until christmas, date difference",
    "article": "<h1>Days Until Calculator: Counting Down to Any Date, With the Calendar Traps Explained</h1>\n<p>Counting the days between two dates should be straightforward subtraction, but calendars are messy. Months have different lengths, leap years add an extra day every four years (except every 100 years, except every 400 years), and the question of whether to include the start date or end date changes the answer by one. The days-until calculator handles all of this correctly.</p>\n<h2>The subtraction</h2>\n<p><code>Days Until = Target Date − Today</code></p>\n<p>Both dates are converted to a continuous day count (Julian Day Number or Unix timestamp divided by 86,400), subtracted, and the remainder is the number of days. Timezone is relevant: \"today\" depends on where you are.</p>\n<h2>Common countdown targets</h2>\n<table><tr><th>Event</th><th>Typical date</th><th>Approximate days from Jan 1</th></tr>\n<tr><td>Valentine's Day</td><td>February 14</td><td>45</td></tr>\n<tr><td>US Tax Day</td><td>April 15</td><td>105</td></tr>\n<tr><td>Summer solstice</td><td>June 21</td><td>172</td></tr>\n<tr><td>Halloween</td><td>October 31</td><td>304</td></tr>\n<tr><td>Christmas</td><td>December 25</td><td>359</td></tr>\n<tr><td>New Year's Eve</td><td>December 31</td><td>365</td></tr></table>\n<h2>Inclusive vs. exclusive counting</h2>\n<p>From Monday to Friday: is that 4 days or 5? If you count both endpoints (inclusive), it's 5 calendar days. If you exclude the start date (the standard in computing and most legal contexts), it's 4 days. If you exclude both endpoints, it's 3 days. The difference matters for rental agreements, contract deadlines, and legal filings. The calculator defaults to excluding the start date (the most common convention).</p>\n<h2>Leap year rules</h2>\n<table><tr><th>Rule</th><th>Example</th></tr>\n<tr><td>Divisible by 4 → leap year</td><td>2024, 2028 are leap years</td></tr>\n<tr><td>Divisible by 100 → NOT a leap year</td><td>1900 was not a leap year</td></tr>\n<tr><td>Divisible by 400 → IS a leap year</td><td>2000 was a leap year</td></tr></table>\n<p>This means February 29 exists in 2024 but not in 2100. The Gregorian calendar's leap year rules keep the calendar year aligned with the solar year (365.2422 days) to within one day per 3,236 years.</p>\n<h2>Business days vs. calendar days</h2>\n<p>Many deadlines are specified in business days (excluding weekends and holidays). 10 business days is 14 calendar days if there are no holidays in between — but could be 16+ calendar days if holidays fall within the period. The calculator offers both modes.</p>\n<h2>Psychological uses of countdowns</h2>\n<p>Countdown timers exploit the \"goal gradient effect\" (Hull, 1932): people accelerate effort as they approach a goal. Runners speed up in the final mile; savers increase deposits as their target approaches; students study harder as the exam date nears. A visible countdown converts abstract future deadlines into concrete urgency.</p>\n<h2>Project management applications</h2>\n<p>The days-until calculation is the foundation of every project timeline. Sprint deadlines, release dates, and milestone reviews all depend on accurate day counting. Buffer time — the difference between the planned days and the actual days available — is the most underestimated variable in project planning. Research suggests adding 30–50% buffer to initial estimates to account for scope changes, dependencies, and unplanned work.</p>\n<h2>FAQ</h2>\n<p><strong>Does the calculator handle dates across time zones?</strong><br>It uses your local date. If your target event is in another timezone, adjust accordingly — a midnight event in Tokyo is still \"tomorrow\" in New York.</p>\n<p><strong>Can I count days between past dates?</strong><br>Yes. Enter any two dates and the calculator returns the absolute number of days between them, regardless of whether they are in the past or future.</p>\n<p><strong>What about weeks, months, and years?</strong><br>The calculator converts the day count into years, months, weeks, and days for readability. The conversion uses calendar counting (complete months, then remaining days), not fixed 30-day months.</p>"
  },
  "time-since": {
    "title": "Time Since — Elapsed Time From Any Past Date",
    "description": "Measure exactly how long ago something happened in years, months, days and hours, and understand why calendar months make elapsed-time arithmetic genuinely tricky.",
    "keywords": "time since calculator, how long ago, elapsed time calculator, anniversary calculator, days since date, time elapsed years months days",
    "article": "<h1>Two ways to express elapsed time, and they disagree</h1><p>Ask how long ago 15 March 2019 was, as of 28 August 2026, and there are two correct answers depending on the unit you choose:</p>\n<table><tr><th>Duration</th><th>Days</th><th>Calendar expression</th></tr>\n<tr><td>1 year</td><td>365 (or 366)</td><td>12 months</td></tr>\n<tr><td>5 years</td><td>1,826 (with 1 leap year)</td><td>60 months</td></tr>\n<tr><td>10 years</td><td>3,652 (with 2–3 leap years)</td><td>120 months</td></tr>\n<tr><td>1 billion seconds</td><td>11,574 days</td><td>31 years, 8 months, 8 days</td></tr></table><ul><li><strong>In days:</strong> 2,723 days. Unambiguous, easy to compare, useless for conversation.</li><li><strong>In calendar terms:</strong> 7 years, 5 months and 13 days. Natural to say, but it depends on a convention you have to pick.</li></ul><p>The calendar form is what people want and where the difficulty lives, because months have different lengths. Converting 2,723 days by dividing by 30.44 gives 89.5 months, which is not the same as counting 89 calendar month boundaries and a remainder. Both are defensible; they produce different remainders.</p><h2>How calendar counting actually works</h2><p>The standard method — the one used for ages, service length and most legal purposes — counts complete years first, then complete months, then leftover days:</p><ol><li>From 15 March 2019, count whole years while you stay in the past: 2019 to 2026 is 7 years, landing on 15 March 2026. That is still before 28 August 2026, so 7 years is correct.</li><li>From 15 March 2026, count whole months: April, May, June, July, August gets you to 15 August 2026. That is 5 months.</li><li>From 15 August to 28 August is 13 days.</li></ol><p>Result: <strong>7 years, 5 months, 13 days</strong>. Notice that the answer depends on the order of operations. Counting months first and then years can give a different remainder for the same pair of dates, which is why two calculators sometimes disagree by a day or two on a long span.</p><h2>The month-end problem</h2><p>The clearest illustration of why this is hard. How long from 31 January to 28 February?</p><ul><li>Counting days: 28 days.</li><li>Counting calendar months: is that one full month, or 28 days short of one? 31 February does not exist, so there is no unambiguous anniversary to compare against.</li></ul><p>Different systems answer differently. Most clamp to the last valid day, treating it as a complete month. Some treat it as 0 months and 28 days. Neither is a bug; the calendar is simply underdefined here. If you are calculating a notice period, an interest accrual or a subscription renewal that lands on a month end, check which rule your system applies rather than assuming.</p><h2>Leap day anniversaries</h2><p>Someone born on 29 February has a legal birthday that varies by jurisdiction. In much of the world it is treated as 1 March in non-leap years; in others, including parts of the UK for certain purposes, it is 28 February. This matters for coming-of-age thresholds, licence expiry and insurance. It is one of the few date questions where the correct answer genuinely depends on which country is asking.</p><h2>Things that quietly distort an elapsed-time figure</h2><ul><li><strong>Daylight saving.</strong> If you measure in hours, two days a year are 23 or 25 hours long, so an hour count across a transition will not match days × 24.</li><li><strong>Timezone of the original event.</strong> An event at 23:00 in one zone was already the next day elsewhere. Long-elapsed figures can be off by a day if the start date was recorded in local time and compared against a different zone.</li><li><strong>The device clock.</strong> Everything here is measured against your own device time. A wrong clock produces a confidently wrong answer.</li><li><strong>Historical calendar changes.</strong> For dates before the Gregorian switch — 1582 in Catholic Europe, 1752 in Britain and its colonies, 1918 in Russia — eleven to thirteen days simply do not exist in the record. Elapsed-time arithmetic across those boundaries needs a specialist library, not a general calculator.</li></ul><h2>What people use this for</h2><p>The common cases are milestones and records rather than curiosity: how long since a job started, for a CV or a service-length calculation; how long since a quit date, where the day count is often more motivating than the calendar form; how long a relationship or a business has run, for an anniversary; and how long since a purchase, for a warranty claim. In the last case the day count is the one that matters, because warranty periods are usually specified in months from the date of purchase and the retailer will compute it their way.</p><h2>Questions people actually ask</h2><h3>Why does my age in days not match age in years times 365?</h3><p>Leap days. Over 35 years you accumulate eight or nine extra days, so the multiplication is short by more than a week.</p><h3>Which figure should I use in a formal document?</h3><p>Whichever the document specifies, and if it does not, give the exact start and end dates rather than a duration. A duration is a derived figure with conventions attached; two dates are facts.</p><h3>Can I measure to the hour and minute?</h3><p>Yes, if you have an exact start time. Be aware that precision beyond a day is only meaningful if the original timestamp was recorded that precisely, and that daylight saving affects hour counts.</p><h3>Is the date I enter stored anywhere?</h3><p>No. The calculation runs in your browser and nothing is transmitted or saved.</p>"
  },
  "sleep-debt": {
    "title": "Sleep Debt Calculator — How Much You Owe and How to Repay It",
    "description": "Track accumulated sleep debt against your actual need, and understand why one long weekend lie-in does not clear a week of short nights.",
    "keywords": "sleep debt calculator, sleep deficit, how much sleep do i need, catch up on sleep, chronic sleep restriction, sleep recovery",
    "article": "<h1>Sleep Debt Calculator: How Much Sleep You Owe Your Body — and How to Pay It Back</h1>\n<p>Sleep debt is the cumulative difference between the sleep you need and the sleep you actually get. One night of 6 hours when you need 8 creates a 2-hour debt. Five such nights create a 10-hour debt. The question that matters — and that the research has strong answers to — is whether and how you can repay it.</p>\n<h2>The formula</h2>\n<p><code>Sleep Debt = Σ (Recommended Sleep − Actual Sleep) for each night</code></p>\n<table><tr><th>Night</th><th>Recommended</th><th>Actual</th><th>Nightly debt</th><th>Cumulative debt</th></tr>\n<tr><td>Monday</td><td>8h</td><td>6h</td><td>2h</td><td>2h</td></tr>\n<tr><td>Tuesday</td><td>8h</td><td>5.5h</td><td>2.5h</td><td>4.5h</td></tr>\n<tr><td>Wednesday</td><td>8h</td><td>7h</td><td>1h</td><td>5.5h</td></tr>\n<tr><td>Thursday</td><td>8h</td><td>6h</td><td>2h</td><td>7.5h</td></tr>\n<tr><td>Friday</td><td>8h</td><td>6.5h</td><td>1.5h</td><td>9h</td></tr>\n<tr><td>Weekend (2 nights)</td><td>8h</td><td>10h each</td><td>−2h each</td><td>5h</td></tr></table>\n<p>Weekend catch-up sleep reduced the debt from 9 hours to 5 hours — but did not eliminate it. This pattern, repeated week after week, is how chronic sleep debt accumulates.</p>\n<h2>Sleep recommendations by age (National Sleep Foundation, 2023)</h2>\n<table><tr><th>Age group</th><th>Recommended hours</th></tr>\n<tr><td>Newborns (0–3 months)</td><td>14–17</td></tr>\n<tr><td>Infants (4–11 months)</td><td>12–15</td></tr>\n<tr><td>Toddlers (1–2 years)</td><td>11–14</td></tr>\n<tr><td>Preschool (3–5 years)</td><td>10–13</td></tr>\n<tr><td>School age (6–13 years)</td><td>9–11</td></tr>\n<tr><td>Teenagers (14–17 years)</td><td>8–10</td></tr>\n<tr><td>Adults (18–64 years)</td><td>7–9</td></tr>\n<tr><td>Older adults (65+)</td><td>7–8</td></tr></table>\n<h2>The cognitive cost of sleep debt</h2>\n<p>A landmark 2003 study by Van Dongen et al. (published in Sleep) found that chronic sleep restriction to 6 hours per night for 14 days produced cognitive impairment equivalent to 48 hours of total sleep deprivation — but the subjects did not perceive their impairment. They felt \"fine.\" This disconnect between subjective alertness and objective performance is why sleep debt is dangerous: people with significant debt do not know how impaired they are.</p>\n<h2>Can sleep debt be repaid?</h2>\n<p><strong>Short-term debt (under 20 hours):</strong> Yes — with extended sleep over 1–2 weeks. Add 1–2 hours per night until you consistently wake without an alarm. Recovery sleep is most effective when taken soon after the debt is incurred.</p>\n<p><strong>Chronic debt (months or years of under-sleeping):</strong> Research is less clear. A 2021 study in Current Biology found that weekend recovery sleep did not fully reverse the metabolic damage of chronic short sleep. The implication: you cannot stockpile sleep, and chronic debt may have partially irreversible health consequences.</p>\n<h2>Health consequences of chronic sleep debt</h2>\n<table><tr><th>System</th><th>Effect of chronic sleep debt</th><th>Evidence quality</th></tr>\n<tr><td>Cognitive</td><td>Reduced attention, memory, and decision quality</td><td>Strong (multiple RCTs)</td></tr>\n<tr><td>Metabolic</td><td>Insulin resistance, increased appetite, weight gain</td><td>Strong</td></tr>\n<tr><td>Cardiovascular</td><td>Elevated blood pressure, increased heart disease risk</td><td>Strong (observational + mechanistic)</td></tr>\n<tr><td>Immune</td><td>Reduced vaccine response, increased infection susceptibility</td><td>Moderate</td></tr>\n<tr><td>Mental health</td><td>Increased anxiety, depression risk</td><td>Strong (bidirectional relationship)</td></tr></table>\n<h2>FAQ</h2>\n<p><strong>Can I function on 6 hours of sleep?</strong><br>A small percentage of people (estimated &lt;3%) carry a genetic variant (DEC2) that allows them to function normally on 6 hours. For the other 97%, 6 hours produces measurable cognitive impairment that accumulates over days — even if you feel adapted.</p>\n<p><strong>Is napping effective for reducing sleep debt?</strong><br>Short naps (20–30 minutes) improve alertness and performance without causing sleep inertia. They do not fully substitute for lost nighttime sleep but are effective for acute debt. Naps longer than 30 minutes can interfere with nighttime sleep quality.</p>\n<p><strong>Should I sleep more on weekends?</strong><br>If you are sleep-deprived during the week, yes — weekend catch-up is better than nothing. But the optimal strategy is consistent sleep timing 7 days per week. Irregular sleep schedules disrupt circadian rhythm and reduce sleep quality even when total hours are adequate.</p>"
  },
  "work-hours": {
    "title": "Work Hours Calculator — Timesheets, Breaks and Overtime",
    "description": "Add up worked hours across a week, convert between HH:MM and decimal correctly, subtract unpaid breaks, and calculate overtime without the classic decimal mistake.",
    "keywords": "work hours calculator, timesheet calculator, hours and minutes to decimal, overtime calculator, unpaid break deduction, weekly hours total",
    "article": "<h1>Work Hours Calculator: Tracking Time, Overtime, and the Maths Behind Your Paycheck</h1>\n<p>A work hours calculator converts start and end times into total hours worked, accounts for breaks, and computes gross pay including overtime. The arithmetic is simple — subtract start from end, deduct breaks — but the rules governing overtime, minimum rest periods, and pay calculation vary by jurisdiction and add real complexity.</p>\n<h2>Basic calculation</h2>\n<p><code>Hours Worked = (End Time − Start Time) − Break Duration</code></p>\n<table>\n<tr><th>Example</th><th>Start</th><th>End</th><th>Break</th><th>Hours worked</th></tr>\n<tr><td>Standard day</td><td>9:00 AM</td><td>5:30 PM</td><td>30 min</td><td>8.0 hours</td></tr>\n<tr><td>Early shift</td><td>6:00 AM</td><td>2:15 PM</td><td>45 min</td><td>7.5 hours</td></tr>\n<tr><td>Night shift</td><td>10:00 PM</td><td>6:30 AM</td><td>30 min</td><td>8.0 hours</td></tr>\n<tr><td>Split shift</td><td>8:00 AM</td><td>8:00 PM</td><td>2 hours</td><td>10.0 hours</td></tr>\n</table>\n<h2>Overtime rules by jurisdiction</h2>\n<table>\n<tr><th>Jurisdiction</th><th>Overtime threshold</th><th>Overtime rate</th><th>Double-time</th></tr>\n<tr><td>US (FLSA)</td><td>>40 hours/week</td><td>1.5× regular rate</td><td>Not federally required</td></tr>\n<tr><td>California</td><td>>8 hours/day OR >40/week</td><td>1.5×</td><td>2× after 12 hours/day</td></tr>\n<tr><td>UK</td><td>No statutory overtime rate</td><td>Contractual</td><td>Contractual</td></tr>\n<tr><td>EU (Working Time Directive)</td><td>48-hour weekly maximum</td><td>Varies by member state</td><td>Varies</td></tr>\n<tr><td>India</td><td>>9 hours/day or >48/week</td><td>2× regular rate</td><td>—</td></tr>\n<tr><td>Australia</td><td>Varies by award</td><td>1.5× first 2 hours, 2× after</td><td>Yes</td></tr>\n</table>\n<h2>Gross pay calculation</h2>\n<p><code>Gross Pay = (Regular Hours × Hourly Rate) + (Overtime Hours × Overtime Rate)</code></p>\n<p>Example: 44 hours worked in a week at $25/hour under FLSA rules. Regular: 40 × $25 = $1,000. Overtime: 4 × $37.50 = $150. Total gross: $1,150.</p>\n<h2>Common time-tracking mistakes</h2>\n<p><strong>Rounding errors:</strong> Many employers round to the nearest 15 minutes. Under FLSA rules, rounding must be neutral over time — consistently rounding down is wage theft. The DOL requires that rounding policies do not systematically favour the employer.</p>\n<p><strong>Forgetting unpaid breaks:</strong> A 30-minute unpaid lunch means 8.5 hours on-site but only 8 hours paid. The distinction matters for weekly overtime calculations.</p>\n<p><strong>Cross-midnight shifts:</strong> A shift from 10 PM to 6 AM spans two calendar days. Hours must be attributed correctly for daily overtime jurisdictions like California.</p>\n<h2>Salary vs. hourly: the hidden conversion</h2>\n<p>Salaried employees can calculate their effective hourly rate: Annual Salary ÷ 52 weeks ÷ hours per week. A $70,000 salary at 40 hours/week = $33.65/hour. At 50 hours/week (common in salaried roles) = $26.92/hour. The more hours you work beyond 40, the lower your effective hourly rate — a fact that surprises many salaried workers.</p>\n<h2>The 2,080-hour standard</h2>\n<p>The standard US work year is 2,080 hours (40 hours × 52 weeks). After subtracting 10 federal holidays and 15 vacation days, the actual working hours drop to approximately 1,880. For project planning and billing purposes, many organisations use 1,800 billable hours as a realistic annual target.</p>\n<h2>FAQ</h2>\n<p><strong>Does travel time count as work hours?</strong><br>Under FLSA, normal commuting is not compensable. However, travel during the workday (e.g., driving between client sites) and travel that extends beyond normal working hours (e.g., overnight business trips) may be compensable.</p>\n<p><strong>Are on-call hours paid?</strong><br>It depends on restrictions. If you must stay at or near the workplace, on-call time is generally compensable. If you are free to use the time as you wish (just reachable by phone), it typically is not.</p>\n<p><strong>How do I track hours across multiple jobs?</strong><br>Use separate entries for each employer. For overtime purposes, hours are calculated per employer, not combined — working 30 hours at Job A and 20 hours at Job B does not trigger FLSA overtime at either employer.</p>"
  },
  "retirement-countdown": {
    "title": "Retirement Countdown — Time Left and What It Costs Per Month",
    "description": "Count the years and months to your retirement date, then see the monthly saving that funds it, why delaying ten years nearly doubles the cost, and where the 4% rule breaks.",
    "keywords": "retirement countdown, years until retirement, retirement savings calculator, 4 percent rule, 25 times expenses, compound interest retirement, fire number",
    "article": "<h1>The countdown is the easy half</h1><p>Someone aged 35 planning to retire at 60 has <strong>25 years, or 300 months</strong>, or about 6,500 remaining working days after weekends and leave. That last figure is the one that tends to focus attention, because it is a number you can actually picture.</p><p>But a countdown without a funding figure is just a calendar. The useful question is what those 300 months need to carry.</p><h2>How much you need: the 25 times rule</h2><p>The most widely used starting estimate says your portfolio should be about <strong>25 times your annual spending</strong>. It comes from the 4% withdrawal rule — if you draw 4% of the starting balance each year, adjusted for inflation, a stock-and-bond portfolio historically survived 30 years in the large majority of tested periods.</p><p>So a household spending 40,000 a year needs roughly <strong>1,000,000</strong>. Note that it is 25 times <em>spending</em>, not income — which is why reducing planned expenses is mathematically identical to saving more, and usually easier. Cutting 5,000 a year from your target lifestyle removes 125,000 from the number you have to accumulate.</p><h2>What that costs per month, and why starting date dominates</h2><p>The future value of regular contributions, assuming a 7% real return after inflation:</p><p><code>Monthly = target × r ÷ ((1 + r)ⁿ − 1), with r and n in years then divided by 12</code></p><table><tr><th>Start age</th><th>Years to 60</th><th>Needed per year</th><th>Needed per month</th></tr><tr><td>25</td><td>35</td><td>7,234</td><td>603</td></tr><tr><td>35</td><td>25</td><td>15,814</td><td>1,318</td></tr><tr><td>45</td><td>15</td><td>39,795</td><td>3,316</td></tr><tr><td>50</td><td>10</td><td>72,378</td><td>6,032</td></tr></table><p>Look at the jump between 35 and 45. Ten years of delay does not raise the cost by 40% — it raises the monthly contribution from 1,318 to <strong>3,316</strong>, two and a half times as much, for the identical goal. The reason is that the earliest contributions are the ones with the most years to compound, so they do the heaviest lifting. A payment made at 25 has 35 years of growth behind it; one made at 55 has five.</p><p>This is the single most valuable fact in retirement planning, and it is also the least actionable if you are already 45 — in which case the honest levers are a higher saving rate, a later retirement date, or a lower target, and usually some of each.</p><h2>Where the 4% rule genuinely breaks down</h2><p>The rule came from studies of historical US market returns over rolling 30-year periods. Its limitations are well documented and worth knowing before you build a life on it:</p><ul><li><strong>Sequence-of-returns risk.</strong> A severe market fall in your first two or three retired years is far more damaging than the same fall later, because you are selling assets into the decline. Averages hide this entirely.</li><li><strong>It assumed a 30-year horizon.</strong> Retiring at 50 with a 45-year horizon needs a lower rate — commonly cited figures are 3 to 3.5%, which raises the multiple from 25 to nearer 30.</li><li><strong>It was derived from one country market history.</strong> Applying US historical returns to other markets produces materially worse outcomes in several cases.</li><li><strong>It ignores fees and tax.</strong> A 1% annual fee is a quarter of a 4% withdrawal. Tax treatment of withdrawals varies enormously by jurisdiction and account type.</li><li><strong>Real spending is not flat.</strong> Most retirees spend more in the early active years, less in the middle, then more again on healthcare. A constant inflation-adjusted draw is a modelling convenience.</li></ul><h2>What the arithmetic cannot include</h2><p>This calculation deliberately leaves out several things that will change your actual number: state or employer pensions, which may cover a substantial share of your spending and reduce the portfolio you need; employer matching, which is an immediate return no market can beat; the value of your home, which is not spendable unless you downsize; healthcare costs, which are the largest single uncertainty in many countries; and the possibility of part-time work, which reduces the required multiple sharply in the early years.</p><p>A 7% real return is an assumption, not a fact. Long-run global equity returns have been broadly in that region, but with drawdowns of 40% or more along the way and multi-decade periods of lower returns. Nothing here is financial advice, and for a plan involving your actual retirement, a regulated adviser who can see your pensions, tax position and family situation is worth the fee.</p><h2>Questions people actually ask</h2><h3>Should I count my pension in the target?</h3><p>Yes, by subtracting it from the spending your portfolio has to cover. If you spend 40,000 and a pension pays 15,000, your portfolio only needs to fund 25,000 — so the target drops from 1,000,000 to 625,000.</p><h3>Is it worth saving if I have high-interest debt?</h3><p>Clear the debt first, with one exception: contribute at least enough to capture any employer match, because that is typically an instant 50 to 100% return that no debt rate exceeds.</p><h3>Does the countdown assume I stop working entirely?</h3><p>It assumes you stop drawing a salary. Many people find that earning even a modest amount in the first few retired years dramatically reduces sequence risk, because it avoids selling assets during an early downturn.</p><h3>Is my financial information stored?</h3><p>No. Everything you enter is used only in your browser and nothing is transmitted or saved.</p>"
  },
  "life-percentage": {
    "title": "Life Percentage Calculator — How Much of Your Life Has Passed",
    "description": "See what share of an expected lifespan you have used, and why the naive subtraction understates how long you are likely to live.",
    "keywords": "life percentage calculator, percentage of life lived, life expectancy calculator, how much life left, conditional life expectancy",
    "article": "<h1>Life Percentage Calculator: Visualising How Much Time Has Passed</h1>\n<p>Enter your date of birth and a life expectancy estimate, and the life percentage calculator returns a single number: how far through your expected lifespan you are, expressed as a percentage. It is a simple division — days lived divided by days expected — but the emotional impact of seeing \"47.3% complete\" tends to be disproportionate to the arithmetic.</p>\n\n<h2>The formula</h2>\n<p><code>Life Percentage = (Current Date − Birth Date) / (Expected Death Date − Birth Date) × 100</code></p>\n<p>All dates are converted to days for precision. Leap years are accounted for automatically.</p>\n\n<h2>Life expectancy benchmarks (2024 WHO data)</h2>\n<table>\n<tr><th>Region / Country</th><th>Male</th><th>Female</th><th>Overall</th></tr>\n<tr><td>Japan</td><td>81.5</td><td>87.6</td><td>84.6</td></tr>\n<tr><td>Switzerland</td><td>82.0</td><td>85.9</td><td>84.0</td></tr>\n<tr><td>Australia</td><td>81.3</td><td>85.4</td><td>83.3</td></tr>\n<tr><td>United Kingdom</td><td>79.4</td><td>83.0</td><td>81.2</td></tr>\n<tr><td>United States</td><td>74.8</td><td>80.2</td><td>77.5</td></tr>\n<tr><td>India</td><td>69.4</td><td>72.0</td><td>70.8</td></tr>\n<tr><td>Nigeria</td><td>53.1</td><td>55.2</td><td>54.3</td></tr>\n<tr><td>Global average</td><td>70.8</td><td>75.9</td><td>73.3</td></tr>\n</table>\n<p>These are averages at birth. If you have already reached age 40, your remaining life expectancy is higher than the at-birth average because you have survived the high-mortality early years. Actuarial life tables (published by the Social Security Administration in the US, and ONS in the UK) provide age-adjusted figures.</p>\n\n<h2>Why this number hits differently</h2>\n<p>Psychologists call it \"mortality salience\" — awareness of one's own finite lifespan. Terror Management Theory (TMT), developed by Greenberg, Pyszczynski, and Solomon, proposes that awareness of death is a fundamental motivator of human behaviour. Making mortality concrete (a percentage rather than an abstract \"someday\") triggers a psychological response that can be either paralysing or motivating, depending on personality and context.</p>\n\n<h2>What people actually do with this number</h2>\n<p><strong>Priority reassessment:</strong> Seeing \"53% complete\" prompts questions like \"Am I spending the remaining 47% on things I actually value?\" Multiple productivity and self-help frameworks (including Tim Urban's \"Life in Weeks\" visualisation) use this effect deliberately.</p>\n<p><strong>Financial planning:</strong> The percentage maps directly onto retirement planning horizons. At 50% life completion with 0% retirement savings, the maths becomes urgent and specific.</p>\n<p><strong>Health motivation:</strong> Life expectancy is not fixed. Regular exercise, non-smoking, moderate alcohol, and healthy BMI extend life expectancy by 7–14 years according to a 2018 study in the journal Circulation. That shifts the denominator and the percentage.</p>\n\n<h2>Factors that adjust your personal estimate</h2>\n<table>\n<tr><th>Factor</th><th>Impact on life expectancy</th></tr>\n<tr><td>Regular exercise (150 min/week)</td><td>+3 to 7 years</td></tr>\n<tr><td>Non-smoking</td><td>+8 to 10 years vs. current smoker</td></tr>\n<tr><td>Healthy BMI (18.5–24.9)</td><td>+2 to 5 years</td></tr>\n<tr><td>Family history of longevity</td><td>+3 to 5 years (genetic component 20–30%)</td></tr>\n<tr><td>Chronic disease (diabetes, heart disease)</td><td>−5 to 15 years depending on management</td></tr>\n<tr><td>Socioeconomic status (top vs. bottom quintile)</td><td>+10 to 15 years in the US (Chetty et al., 2016)</td></tr>\n</table>\n\n<h2>The philosophical framing</h2>\n<p>Seneca wrote in <em>On the Shortness of Life</em>: \"It is not that we have a short time to live, but that we waste a great deal of it.\" The life percentage calculator is a quantitative expression of this idea — it does not tell you what to do with the remaining percentage, but it removes the comfortable ambiguity of \"I have plenty of time.\"</p>\n\n<h2>FAQ</h2>\n<p><strong>Is life expectancy a reliable predictor of my personal lifespan?</strong><br>No — it is a population average, not an individual prediction. Your actual lifespan depends on genetics, lifestyle, environment, and chance. The number is useful as a planning horizon, not a forecast.</p>\n<p><strong>What life expectancy should I use?</strong><br>Use your country's current average as a baseline, then adjust upward if you are healthy, active, and non-smoking, or downward if you have significant risk factors. Actuarial tables provide age-adjusted figures that are more accurate than birth-average data.</p>\n<p><strong>Should I show this to children?</strong><br>Exercise judgment. For teenagers studying time management or planning, it can be motivating. For younger children, the mortality framing may be distressing without practical benefit.</p>"
  },
  "meeting-cost": {
    "title": "Meeting Cost Calculator — What That Hour Actually Costs",
    "description": "Price a meeting in salary terms using fully loaded cost, see what a recurring weekly meeting costs over a year, and count the hidden cost that salary alone misses.",
    "keywords": "meeting cost calculator, cost of meetings, fully loaded employee cost, recurring meeting cost, meeting roi, hourly cost per employee",
    "article": "<h1>Meeting Cost Calculator: Quantifying the Most Expensive Activity in Your Organisation</h1>\n<p>Meetings are the largest untracked expense in most companies. A one-hour meeting with eight people at an average loaded cost of $75 per hour costs $600. If that meeting recurs weekly, the annual cost is $31,200 — for a single recurring calendar event. Most organisations run dozens of weekly meetings without ever calculating the total spend.</p>\n\n<h2>The formula behind meeting cost</h2>\n<p><code>Meeting Cost = Σ (Hourly Loaded Cost per Attendee) × Duration in Hours</code></p>\n<p>Loaded cost includes salary, benefits, office space, equipment, and employer taxes. A common multiplier is 1.3–1.5× the gross salary, though the exact figure depends on geography and industry.</p>\n\n<h2>Loaded cost by role (US market, 2024–2025 data)</h2>\n<table>\n<tr><th>Role</th><th>Base salary</th><th>Loaded cost/hour</th></tr>\n<tr><td>Junior engineer</td><td>$75,000</td><td>$50</td></tr>\n<tr><td>Senior engineer</td><td>$140,000</td><td>$92</td></tr>\n<tr><td>Product manager</td><td>$130,000</td><td>$85</td></tr>\n<tr><td>Engineering manager</td><td>$170,000</td><td>$112</td></tr>\n<tr><td>VP-level executive</td><td>$250,000</td><td>$164</td></tr>\n<tr><td>C-suite executive</td><td>$350,000+</td><td>$230+</td></tr>\n</table>\n\n<h2>Real-world scenario: the cost of a weekly standup</h2>\n<table>\n<tr><th>Detail</th><th>Value</th></tr>\n<tr><td>Attendees</td><td>8 engineers + 1 PM + 1 EM</td></tr>\n<tr><td>Average loaded cost</td><td>$72/hour</td></tr>\n<tr><td>Duration</td><td>15 minutes (0.25 hours)</td></tr>\n<tr><td>Cost per meeting</td><td>$180</td></tr>\n<tr><td>Annual cost (50 weeks)</td><td>$9,000</td></tr>\n</table>\n<p>A 15-minute standup seems harmless, but even this small meeting costs $9,000 per year. The question is not whether it is expensive — every meeting with multiple people is expensive — but whether the $9,000 generates more than $9,000 in coordination value. Often it does. The problem is that nobody asks the question.</p>\n\n<h2>The hidden cost: context switching</h2>\n<p>Meeting cost calculators typically count only labour time, but research from the University of California, Irvine, shows that it takes an average of 23 minutes to return to full focus after an interruption. A 30-minute meeting in the middle of a coding block effectively costs 53 minutes of productive time per attendee. For deep-work roles like engineering and design, the context-switching cost can exceed the meeting's direct labour cost.</p>\n\n<h2>Microsoft's internal research</h2>\n<p>Microsoft's 2022 Work Trend Index, based on anonymised data from 31,000 workers, found that the average employee spends 252 percent more time in meetings compared to pre-pandemic levels. The same study found that meeting-heavy weeks correlate with lower self-reported productivity and higher burnout scores. The relationship is not causal — busy periods naturally involve more meetings — but the correlation is strong enough to warrant attention.</p>\n\n<h2>How to reduce meeting costs without cancelling meetings</h2>\n<p><strong>Halve the default duration:</strong> Most calendar apps default to 30 or 60 minutes. Changing the default to 25 or 50 minutes builds in transition time and forces tighter agendas.</p>\n<p><strong>Halve the attendee list:</strong> Amazon's \"two-pizza rule\" suggests that no meeting should require more than two pizzas to feed. Smaller meetings make faster decisions and cost less per minute.</p>\n<p><strong>Replace information meetings with documents:</strong> If the meeting is primarily one person presenting while others listen, a written document distributed asynchronously is faster, cheaper, and creates a permanent record.</p>\n\n<h2>FAQ</h2>\n<p><strong>How do I estimate loaded cost without knowing exact benefits?</strong><br>Multiply the annual base salary by 1.4 and divide by 2,080 (working hours per year). This gives a reasonable estimate for most salaried employees in the US and Europe.</p>\n<p><strong>Should I include travel time?</strong><br>For in-person meetings in different buildings or cities, yes. Travel time is time that could have been spent on productive work, and it should be costed at the same loaded rate.</p>\n<p><strong>Is there an optimal meeting length?</strong><br>Research suggests that meetings over 45 minutes see declining attention and participation. For decision-making meetings, 25 minutes is often sufficient when the pre-read has been circulated.</p>"
  },
  "salary-negotiation": {
    "title": "Salary Negotiation Calculator — What One Conversation Is Worth",
    "description": "See the lifetime value of a starting-salary difference once annual raises compound, and what to weigh besides the base number.",
    "keywords": "salary negotiation calculator, lifetime value of a raise, compounding salary, starting salary impact, negotiate salary, total compensation",
    "article": "<h1>Salary Negotiation Calculator: Quantifying What a Higher Offer Is Actually Worth</h1>\n<p>A salary negotiation calculator takes a current offer and a target salary and shows the compound impact of the difference over 5, 10, and 20 years. The tool exists because human brains systematically undervalue small annual differences. A $5,000 higher starting salary, compounded at 3% annual raises over a 30-year career, is worth $237,000 in cumulative additional earnings — and most people never negotiate at all.</p>\n\n<h2>The compounding math</h2>\n<table>\n<tr><th>Year</th><th>Salary at $80,000 start (3% raises)</th><th>Salary at $85,000 start (3% raises)</th><th>Cumulative gap</th></tr>\n<tr><td>1</td><td>$80,000</td><td>$85,000</td><td>$5,000</td></tr>\n<tr><td>5</td><td>$90,093</td><td>$95,724</td><td>$26,876</td></tr>\n<tr><td>10</td><td>$104,427</td><td>$110,954</td><td>$58,784</td></tr>\n<tr><td>20</td><td>$140,319</td><td>$149,089</td><td>$134,468</td></tr>\n<tr><td>30</td><td>$188,567</td><td>$200,353</td><td>$237,152</td></tr>\n</table>\n<p>The gap accelerates because each year's raise is a percentage of the current salary, not the original. This is why negotiating the initial offer — not asking for a raise three years in — has the largest lifetime impact.</p>\n\n<h2>Why most people don't negotiate</h2>\n<p>A 2023 Glassdoor survey found that 73% of employers expect candidates to negotiate, yet only 39% of candidates actually do. The primary reasons: fear of the offer being rescinded (which almost never happens for professional roles), discomfort with confrontation, and lack of data about market rates. The negotiation calculator addresses the last problem directly.</p>\n\n<h2>What to negotiate beyond base salary</h2>\n<table>\n<tr><th>Component</th><th>Negotiable?</th><th>Monetary equivalent</th></tr>\n<tr><td>Signing bonus</td><td>Almost always</td><td>$5,000–$50,000</td></tr>\n<tr><td>Equity / stock options</td><td>Usually at senior levels</td><td>Varies widely; 4-year vest typical</td></tr>\n<tr><td>Remote work days</td><td>Increasingly yes</td><td>$5,000–$15,000/year in commuting + time savings</td></tr>\n<tr><td>Vacation days</td><td>Sometimes</td><td>1 day ≈ 0.5% of salary</td></tr>\n<tr><td>Professional development budget</td><td>Usually</td><td>$1,000–$5,000/year</td></tr>\n<tr><td>Title</td><td>Often the easiest to negotiate</td><td>Indirect — affects future salary anchoring</td></tr>\n</table>\n\n<h2>Negotiation scripts that work</h2>\n<p><strong>The grateful counter:</strong> \"Thank you for this offer — I'm excited about the role. Based on my research and the scope of the position, I was expecting something closer to $X. Is there flexibility to close that gap?\" This approach is direct without being aggressive and gives the employer room to respond.</p>\n<p><strong>The competing offer:</strong> \"I have another offer at $X. I prefer your company for [specific reason], but the compensation difference is significant. Can we discuss bridging it?\" This only works if the competing offer is real — fabricating offers is dishonest and easily caught.</p>\n<p><strong>The total compensation reframe:</strong> \"If the base salary is firm, could we explore a signing bonus, additional equity, or extra vacation days to bring the total package closer to my target?\" This gives the employer multiple levers and increases the chance of a positive outcome.</p>\n\n<h2>Market rate research sources</h2>\n<p>Before negotiating, establish a defensible market range using at least three data sources: Levels.fyi (tech-focused, includes equity), Glassdoor (broad, self-reported), the Bureau of Labor Statistics Occupational Outlook Handbook (government data, lags 1–2 years), PayScale (adjusted for geography and experience), and LinkedIn Salary (requires profile data). The intersection of three or more sources gives a credible range.</p>\n\n<h2>The gender and race negotiation gap</h2>\n<p>Research consistently shows that women negotiate less frequently and receive smaller increases when they do. A 2023 meta-analysis in the Journal of Applied Psychology found that men initiate negotiations 1.5× more often and secure 7.4% higher first offers on average. The gap is driven by social expectations, backlash risk, and information asymmetry — all of which structured negotiation tools can help reduce.</p>\n\n<h2>FAQ</h2>\n<p><strong>Can negotiating cost me the offer?</strong><br>In professional and corporate hiring, almost never. A 2019 survey by Robert Half found that only 1% of hiring managers withdrew offers after a candidate negotiated. The risk is overwhelmingly lower than the reward.</p>\n<p><strong>When should I NOT negotiate?</strong><br>Government jobs with fixed pay scales, union positions with collective agreements, and roles where the offer explicitly states \"non-negotiable\" (rare). Even in these cases, benefits and start date are often flexible.</p>\n<p><strong>How much above the offer should I counter?</strong><br>10–20% above the initial offer is the standard range. Going higher requires strong justification (unique skills, competing offers, market data). Going lower than 10% is usually not worth the negotiation effort.</p>"
  },
  "freelance-rate": {
    "title": "Freelance Rate Calculator — What You Must Charge to Match a Salary",
    "description": "Work out an hourly freelance rate from a target income using billable utilisation, and see why matching a 60,000 salary needs roughly two and a half times the employee hourly rate.",
    "keywords": "freelance rate calculator, hourly rate calculator, contractor rate vs salary, billable utilisation, day rate calculator, self employed hourly rate",
    "article": "<h1>How to Calculate Your Freelance Rate — Without Underselling or Pricing Yourself Out</h1>\n<p>Most freelancers set rates by guessing, copying competitors, or converting their last salary to hourly. All three methods are unreliable. A proper rate calculation works backwards from your financial needs, accounts for the hidden costs of self-employment, and produces a number you can defend in negotiation.</p>\n\n<h2>The foundational formula</h2>\n<p><code>Hourly Rate = (Annual Expenses + Profit Margin) / Billable Hours Per Year</code></p>\n<p>Each variable hides complexity that most rate calculators gloss over.</p>\n\n<h2>Estimating true annual expenses</h2>\n<table>\n<tr><th>Category</th><th>Employee (covered by employer)</th><th>Freelancer (self-funded)</th></tr>\n<tr><td>Health insurance</td><td>Employer pays 70–80%</td><td>100% self-funded ($6,000–$15,000/year in the US)</td></tr>\n<tr><td>Retirement contributions</td><td>Employer match (3–6%)</td><td>Self-funded (target 15–20% of income)</td></tr>\n<tr><td>Payroll taxes (employer portion)</td><td>Employer pays 7.65% FICA</td><td>Self-employment tax: 15.3% on net earnings</td></tr>\n<tr><td>Paid time off</td><td>10–20 days paid</td><td>$0 income during time off</td></tr>\n<tr><td>Equipment and software</td><td>Company-provided</td><td>$2,000–$5,000/year</td></tr>\n<tr><td>Accounting and legal</td><td>HR department</td><td>$1,000–$3,000/year</td></tr>\n</table>\n<p>A common rule of thumb: freelancers need to earn 1.4–1.6 times their equivalent salary to match the same take-home pay and benefits. A $80,000 salaried position requires freelance revenue of $112,000–$128,000.</p>\n\n<h2>Billable hours are not work hours</h2>\n<p>The single biggest mistake freelancers make is dividing by 2,080 (40 hours × 52 weeks). In practice, only 60–70 percent of work hours are billable. The rest goes to:</p>\n<ul>\n<li>Marketing and lead generation (5–10 hours/week)</li>\n<li>Administrative work: invoicing, bookkeeping, email (3–5 hours/week)</li>\n<li>Professional development and skill maintenance (2–4 hours/week)</li>\n<li>Vacation, sick days, and holidays (4–6 weeks/year)</li>\n</ul>\n<p>Realistic billable hours for a full-time freelancer: 1,000–1,400 per year, not 2,080.</p>\n\n<h2>Worked example</h2>\n<table>\n<tr><th>Line item</th><th>Amount</th></tr>\n<tr><td>Desired take-home salary</td><td>$80,000</td></tr>\n<tr><td>Self-employment tax (15.3%)</td><td>$12,240</td></tr>\n<tr><td>Health insurance</td><td>$8,400</td></tr>\n<tr><td>Retirement savings (15%)</td><td>$12,000</td></tr>\n<tr><td>Equipment, software, subscriptions</td><td>$3,600</td></tr>\n<tr><td>Accounting and legal</td><td>$2,000</td></tr>\n<tr><td>Profit margin (10%)</td><td>$11,824</td></tr>\n<tr><td><strong>Total annual revenue needed</strong></td><td><strong>$130,064</strong></td></tr>\n<tr><td>Billable hours (1,200/year)</td><td>—</td></tr>\n<tr><td><strong>Hourly rate</strong></td><td><strong>$108</strong></td></tr>\n</table>\n<p>This is the minimum sustainable rate, not the aspirational one. Charging $50/hour with these numbers means working 2,600 billable hours per year — which is physically impossible without burnout.</p>\n\n<h2>Hourly versus project-based pricing</h2>\n<p>Hourly billing is transparent but penalises efficiency: as you get faster, you earn less per project. Project-based pricing rewards expertise and aligns incentives with the client's outcomes. Most experienced freelancers transition to project pricing over time, using their hourly rate internally to scope and quote projects.</p>\n\n<h2>When to raise your rate</h2>\n<p>Three reliable signals: you are booked more than 80 percent of the time for three consecutive months; new clients accept your rate without negotiation; or you have developed specialist expertise that fewer competitors offer. Raise by 10–20 percent for new clients and grandfather existing clients for one billing cycle.</p>\n\n<h2>FAQ</h2>\n<p><strong>Should I charge less when starting out?</strong><br>Slightly lower rates are reasonable for the first 3–6 months while building a portfolio, but never below your cost floor. Underpricing attracts price-sensitive clients who are the hardest to work with and the most likely to dispute invoices.</p>\n<p><strong>How do I handle clients who say my rate is too high?</strong><br>Reframe the conversation around value delivered, not hours spent. If a $5,000 project saves the client $50,000, the rate is irrelevant. If the client still pushes back, they may not be the right fit.</p>\n<p><strong>Do rates vary by country?</strong><br>Significantly. A senior developer in the US charges $100–$200/hour; the same skill set in South Asia might bill $25–$50/hour. Geographic arbitrage is real, but so are cost-of-living differences that drive those rates.</p>"
  },
  "savings-goal": {
    "title": "Savings Goal Calculator — Monthly Amount to Hit a Target by a Date",
    "description": "Calculate the monthly contribution needed to reach a savings target by a deadline, with and without interest, and see how much the interest actually contributes.",
    "keywords": "savings goal calculator, monthly savings needed, save for a target, sinking fund calculator, savings with interest, how much to save per month",
    "article": "<h1>How a Savings Goal Calculator Actually Works — and Why the Default Assumptions Mislead</h1>\n<p>A savings goal calculator takes four inputs — target amount, time horizon, current savings, and expected return — and tells you how much to set aside each month. The arithmetic is straightforward compound-interest algebra, but the result is only as honest as the assumptions, and the default assumptions on most calculator sites are quietly optimistic.</p>\n\n<h2>The core formula</h2>\n<p>If you need a future value <em>FV</em>, already have a present value <em>PV</em>, earn a monthly rate <em>r</em>, and have <em>n</em> months, the required monthly contribution <em>C</em> is:</p>\n<p><code>C = (FV − PV × (1+r)^n) / ((1+r)^n − 1) × r</code></p>\n<p>This is the standard annuity formula rearranged to solve for payment. Every savings calculator on the internet uses it; the differences are in what they assume for <em>r</em> and whether they adjust for inflation.</p>\n\n<h2>Real versus nominal returns</h2>\n<table>\n<tr><th>Asset class</th><th>Nominal long-run return (annualised)</th><th>After 3% inflation</th></tr>\n<tr><td>High-yield savings account</td><td>4.5–5.0%</td><td>1.5–2.0%</td></tr>\n<tr><td>Government bonds (10-year)</td><td>4.0–5.0%</td><td>1.0–2.0%</td></tr>\n<tr><td>Diversified equity index (S&P 500)</td><td>9.5–10.5%</td><td>6.5–7.5%</td></tr>\n<tr><td>Balanced 60/40 portfolio</td><td>7.0–8.0%</td><td>4.0–5.0%</td></tr>\n</table>\n<p>Most calculator defaults use 6–8 percent without specifying whether that is real or nominal. If you are saving for a goal ten years away, a 3 percent annual inflation difference compounds into a 34 percent gap in purchasing power. Always use the real (inflation-adjusted) return, or inflate your target by the expected CPI rate.</p>\n\n<h2>Why lump sums early matter disproportionately</h2>\n<p>Compound interest is not linear. A single $5,000 deposit at the start of a 20-year plan at 6 percent real grows to $16,036. The same $5,000 deposited 10 years in grows to only $8,954. Timing the lump sum matters almost as much as the amount, which is why financial planners emphasise starting early over starting large.</p>\n\n<h2>Scenario table: saving $100,000 in 10 years</h2>\n<table>\n<tr><th>Return assumption</th><th>Monthly contribution needed</th><th>Total paid in</th><th>Interest earned</th></tr>\n<tr><td>0% (mattress savings)</td><td>$833</td><td>$100,000</td><td>$0</td></tr>\n<tr><td>3% real</td><td>$715</td><td>$85,800</td><td>$14,200</td></tr>\n<tr><td>6% real</td><td>$610</td><td>$73,200</td><td>$26,800</td></tr>\n<tr><td>8% real</td><td>$547</td><td>$65,640</td><td>$34,360</td></tr>\n</table>\n<p>The gap between 0 percent and 6 percent is $223 per month — meaningful, but not transformative for most budgets. The real lesson is that even modest returns dramatically reduce the total out-of-pocket cost over a decade.</p>\n\n<h2>Common mistakes when setting savings goals</h2>\n<p><strong>Ignoring taxes on returns:</strong> Interest, dividends, and capital gains are taxed in most jurisdictions. A 6 percent return in a taxable account at a 25 percent marginal rate is effectively 4.5 percent. Use tax-advantaged accounts (ISA, 401(k), RRSP, PPF) wherever possible.</p>\n<p><strong>Setting one large goal instead of milestones:</strong> A $100,000 target over 10 years feels abstract. Break it into annual checkpoints: $8,500 after year one, $18,000 after year two, and so on. Each checkpoint gives you a feedback loop and a reason to celebrate or course-correct.</p>\n<p><strong>Not accounting for income growth:</strong> Most people's income rises over time. A flat monthly contribution ignores the fact that $700 per month is harder to sustain at age 22 than at age 30. Consider starting with a lower contribution and increasing it by 3–5 percent annually — many employers automate this in retirement plans.</p>\n\n<h2>Psychological research on savings behaviour</h2>\n<p>Behavioural economists have consistently found that people save more when the goal is concrete and visual. A 2019 study in the Journal of Consumer Research found that savers who named their accounts after specific goals (e.g., \"Tokyo Trip 2027\") saved 27 percent more than those using generic labels (\"Savings\"). The Gen Code Tools savings goal calculator lets you name your target for this reason.</p>\n\n<h2>How to use this tool effectively</h2>\n<ol>\n<li>Enter your target amount in today's dollars</li>\n<li>Set the timeline — be realistic, not aspirational</li>\n<li>Enter your current savings balance</li>\n<li>Use a conservative return estimate (3–5 percent real)</li>\n<li>Review the monthly contribution and compare it to your budget</li>\n<li>Adjust the timeline or target until the number is sustainable</li>\n</ol>\n\n<h2>FAQ</h2>\n<p><strong>Should I include employer match in my savings calculation?</strong><br>Yes — an employer match is free money and should be included in the \"current savings\" or \"additional contributions\" field. Not including it understates your progress.</p>\n<p><strong>How often should I recalculate?</strong><br>Annually, or whenever your income, expenses, or market conditions change significantly. A savings plan is a living document, not a one-time calculation.</p>\n<p><strong>What if I miss a month?</strong><br>One missed month over a 10-year plan has negligible impact — about 0.1 percent of the final balance. Three consecutive missed months is more serious and suggests the contribution level needs adjustment.</p>"
  },
  "cost-per-use": {
    "title": "Cost Per Use Calculator — The Only Price That Matters",
    "description": "Divide price by realistic lifetime uses to compare purchases honestly, including resale value and running costs, and see where the metric misleads.",
    "keywords": "cost per use calculator, cost per wear, price per use, buy it for life, total cost of ownership, is it worth buying",
    "article": "<h1>Cost Per Use: The Metric That Changes How You Buy</h1>\n<p>Every purchase has two prices: the number on the tag and the real cost per time you use the item. A $200 jacket worn 150 times costs $1.33 per use. A $50 jacket worn 5 times costs $10 per use. The cheap jacket is the expensive one — and most buying decisions get this wrong because human brains anchor on sticker price, not usage rate.</p>\n\n<h2>The formula</h2>\n<p>Cost per use is deceptively simple:</p>\n<p><code>Cost Per Use = (Purchase Price − Resale Value) / Number of Uses</code></p>\n<p>Including resale value matters for items with active secondary markets — electronics, designer goods, vehicles. A $1,000 phone sold for $400 after two years and used daily has a cost per use of ($1,000 − $400) / 730 = $0.82.</p>\n\n<h2>Benchmarks across categories</h2>\n<table>\n<tr><th>Item</th><th>Purchase price</th><th>Expected uses</th><th>Cost per use</th><th>Verdict</th></tr>\n<tr><td>Daily-wear shoes</td><td>$180</td><td>300</td><td>$0.60</td><td>Excellent</td></tr>\n<tr><td>Gym membership (annual)</td><td>$600</td><td>156 (3x/week)</td><td>$3.85</td><td>Good</td></tr>\n<tr><td>Gym membership (annual)</td><td>$600</td><td>24 (2x/month)</td><td>$25.00</td><td>Poor</td></tr>\n<tr><td>Stand mixer</td><td>$350</td><td>50 (over 10 years)</td><td>$7.00</td><td>Moderate</td></tr>\n<tr><td>Fast-fashion dress</td><td>$30</td><td>3</td><td>$10.00</td><td>Poor</td></tr>\n<tr><td>Quality wool coat</td><td>$400</td><td>500 (over 8 winters)</td><td>$0.80</td><td>Excellent</td></tr>\n</table>\n\n<h2>Why our brains fail at this calculation</h2>\n<p>Behavioural economists identify three biases that distort purchase decisions against cost-per-use thinking:</p>\n<p><strong>Anchoring on sticker price:</strong> The $400 coat triggers loss aversion even when the $30 dress is objectively more expensive per wear. We anchor on the immediate cash outflow, not the amortised cost.</p>\n<p><strong>Optimism bias on usage:</strong> People consistently overestimate how often they will use new purchases. The treadmill, the bread maker, the language course — each is bought with the best of intentions and realistic usage rates that are two to five times too high.</p>\n<p><strong>Sunk cost neglect:</strong> Once a purchase is made, people stop tracking whether they use it enough to justify the cost. The gym membership is a classic: the pain of cancelling feels like admitting failure, so the $25-per-visit membership continues month after month.</p>\n\n<h2>Categories where cost-per-use matters most</h2>\n<p><strong>Clothing:</strong> The fashion industry depends on low sticker prices and high replacement rates. Applying cost-per-use thinking to a wardrobe typically reduces total spending while increasing the quality of what you own. A useful rule: if you would not wear it at least 30 times, the cost per use is probably too high.</p>\n<p><strong>Technology:</strong> Phones, laptops, and tablets have a clear expected lifespan. Buying a $1,500 laptop that lasts 5 years ($0.82/day) is almost always cheaper than buying a $600 laptop that lasts 2 years ($0.82/day) — but the higher-spec machine typically lasts longer, making the real comparison favour the premium device.</p>\n<p><strong>Subscriptions:</strong> Every subscription is a recurring cost-per-use calculation. A $15/month streaming service used 20 times a month is $0.75 per use. Used twice a month, it is $7.50 — at which point renting individual titles is cheaper.</p>\n\n<h2>How to use the cost-per-use calculator</h2>\n<ol>\n<li>Enter the purchase price of the item</li>\n<li>Estimate the resale or end-of-life value (zero for most consumables)</li>\n<li>Estimate the total number of uses over the item's lifetime — be honest, not aspirational</li>\n<li>Compare the result against your personal threshold (under $1 per use is generally excellent for physical goods)</li>\n</ol>\n\n<h2>Cost per use and sustainability</h2>\n<p>The environmental case for cost-per-use thinking is strong. The Ellen MacArthur Foundation estimates that extending the average lifespan of clothing by just nine months would reduce carbon, water, and waste footprints by 20–30 percent. Buying fewer, better items and using them more is both the cheapest and the greenest strategy.</p>\n\n<h2>FAQ</h2>\n<p><strong>What is a good cost per use?</strong><br>It depends on the category. For clothing, under $1 is excellent. For electronics, under $1 per day is solid. For subscriptions, compare the per-use cost to the single-purchase alternative.</p>\n<p><strong>Should I include maintenance costs?</strong><br>Yes. A $180 pair of shoes that needs $30 in resoling has a true cost of $210 over 300 uses — still $0.70 per use, which is excellent.</p>\n<p><strong>Does cost per use apply to experiences?</strong><br>Partially. A concert ticket or a vacation has exactly one use, so cost per use equals the ticket price. The metric is most useful for items you use repeatedly.</p>"
  },
  "email-tone": {
    "title": "Email Tone Checker — Find the Hedging Before You Send",
    "description": "Spot the hedges, apologies, intensifiers and passive constructions that weaken an email, with before-and-after rewrites and the limits of automated tone detection.",
    "keywords": "email tone checker, professional email tone, hedging words, sound more confident in email, passive voice email, rewrite email professionally",
    "article": "<h1>Email Tone Analyser: How Your Words Sound to the Reader (and Why It Matters)</h1>\n<p>The email tone analyser evaluates the emotional register of your email text — is it formal, casual, assertive, passive, friendly, or terse? — by examining word choice, sentence length, punctuation patterns, and hedging language. Tone is the dimension of communication that email strips out by removing facial expressions, vocal inflection, and body language. Getting it wrong costs relationships, deals, and promotions.</p>\n<h2>How tone analysis works</h2>\n<p>The analyser scores text across multiple dimensions using Natural Language Processing (NLP) heuristics:</p>\n<table><tr><th>Dimension</th><th>Positive indicators</th><th>Negative indicators</th></tr>\n<tr><td>Warmth</td><td>First names, \"thank you,\" collaborative language (\"we,\" \"together\")</td><td>No greeting, no sign-off, impersonal language</td></tr>\n<tr><td>Confidence</td><td>Direct statements, active voice, clear requests</td><td>Hedging words (\"just,\" \"maybe,\" \"sort of\"), excessive qualifiers</td></tr>\n<tr><td>Formality</td><td>Full sentences, proper punctuation, professional vocabulary</td><td>Slang, emoji, sentence fragments</td></tr>\n<tr><td>Urgency</td><td>\"By Friday,\" \"time-sensitive,\" specific deadlines</td><td>No timeline, vague requests (\"when you get a chance\")</td></tr>\n<tr><td>Negativity</td><td>—</td><td>\"Unfortunately,\" \"disappointed,\" \"unacceptable,\" \"concerned\"</td></tr></table>\n<h2>The most common tone mistakes in professional email</h2>\n<p><strong>\"Just\" and \"sorry\" overuse:</strong> \"I just wanted to check in\" and \"Sorry to bother you\" undermine the sender's authority. Research by Ellen Leanse (former Google executive) found that women use \"just\" in professional emails 2.5× more often than men. Removing it almost always makes the message stronger.</p>\n<p><strong>Missing warmth in bad-news emails:</strong> \"Your request has been denied\" lands differently than \"I understand why this matters to your team. Unfortunately, the budget for this quarter is committed, and I'm unable to approve this request. Let's discuss alternative timing for Q2.\" Same outcome, dramatically different emotional impact.</p>\n<p><strong>Passive aggression through punctuation:</strong> \"Per my last email.\" \"As previously stated.\" \"Please advise.\" These phrases are technically neutral but have become culturally loaded as passive-aggressive signals. The analyser flags them because they consistently produce negative reader reactions.</p>\n<h2>Tone calibration by context</h2>\n<table><tr><th>Context</th><th>Ideal tone</th><th>Avoid</th></tr>\n<tr><td>Client proposal</td><td>Confident, professional, warm</td><td>Hedging, uncertainty, informality</td></tr>\n<tr><td>Team update</td><td>Direct, collaborative, concise</td><td>Formality that creates distance</td></tr>\n<tr><td>Performance feedback</td><td>Specific, constructive, empathetic</td><td>Vagueness, accusatory language</td></tr>\n<tr><td>Cold outreach</td><td>Personal, specific, brief</td><td>Generic templates, hard sells</td></tr>\n<tr><td>Apology</td><td>Accountable, specific, solution-oriented</td><td>Deflection (\"mistakes were made\"), over-apologising</td></tr></table>\n<h2>Cultural tone differences</h2>\n<p>Email tone norms vary significantly across cultures. American business email tends toward warmth and informality (\"Hey Sarah, hope you're doing well!\"). German business email is more formal and direct (\"Sehr geehrte Frau Schmidt\"). Japanese business email follows strict hierarchical politeness levels (keigo). An email that reads as friendly in New York may read as unprofessional in Frankfurt or overly casual in Tokyo.</p>\n<h2>The research on email miscommunication</h2>\n<p>A 2005 study by Justin Kruger (NYU) found that people overestimate their ability to communicate tone via email by about 50%. Senders believed their sarcasm, humour, or seriousness was obvious; recipients interpreted it correctly only about half the time. The conclusion: when tone matters, over-communicate it. State your intent explicitly rather than relying on the reader to infer it from word choice alone.</p>\n<h2>FAQ</h2>\n<p><strong>Should business emails include emoji?</strong><br>Context-dependent. Within a team that uses them regularly, a 😊 conveys warmth. In a first email to a senior executive, it reads as unprofessional. When in doubt, leave them out.</p>\n<p><strong>How long should a professional email be?</strong><br>Boomerang's analysis of 40 million emails found that messages between 50 and 125 words have the highest response rates. Above 200 words, response rates drop sharply.</p>\n<p><strong>Does the analyser replace human judgment?</strong><br>No. It flags patterns associated with common tone issues — hedging, negativity, formality mismatches. The final decision on tone always requires understanding the specific relationship and context.</p>"
  },
  "palindrome-checker": {
    "title": "Palindrome Checker — With the Unicode Problems Nobody Mentions",
    "description": "Check whether text reads the same backwards, understand which characters get normalised away, and see why naive string reversal breaks on emoji and accents.",
    "keywords": "palindrome checker, is it a palindrome, palindrome examples, reverse string, palindromic numbers, palindrome dates, semordnilap",
    "article": "<h1>Palindromes: Pattern, Proof, and Why They Matter Beyond Word Games</h1>\n<p>A palindrome reads the same forwards and backwards. \"racecar\" is one; \"hello\" is not. The concept is older than computing — the earliest known palindrome is the Latin <em>Sator Arepo</em> square from Pompeii, carved before 79 AD — but the algorithmic check is a foundation of computer science education and interview screening.</p>\n\n<h2>How the check works algorithmically</h2>\n<p>The most common approach uses two pointers, one at each end of the string, moving inward:</p>\n<table>\n<tr><th>Step</th><th>Left pointer</th><th>Right pointer</th><th>Match?</th></tr>\n<tr><td>1</td><td>r (index 0)</td><td>r (index 6)</td><td>Yes</td></tr>\n<tr><td>2</td><td>a (index 1)</td><td>a (index 5)</td><td>Yes</td></tr>\n<tr><td>3</td><td>c (index 2)</td><td>c (index 4)</td><td>Yes</td></tr>\n<tr><td>4</td><td>e (index 3) — middle</td><td>—</td><td>Done</td></tr>\n</table>\n<p>Time complexity is O(n/2), which simplifies to O(n). Space complexity is O(1) because no additional data structure is needed — you compare characters in place. This makes the two-pointer method strictly better than reversing the string and comparing, which uses O(n) extra space.</p>\n\n<h2>Edge cases that trip up most implementations</h2>\n<p><strong>Case sensitivity:</strong> \"Racecar\" is a palindrome to a human reader but not to a naïve algorithm that compares ASCII values. Normalise to lowercase before checking.</p>\n<p><strong>Spaces and punctuation:</strong> \"A man, a plan, a canal: Panama\" is the most famous sentence-level palindrome, but only if you strip non-alphanumeric characters first. The question of what counts as a character is surprisingly important in multilingual contexts.</p>\n<p><strong>Unicode and emoji:</strong> JavaScript's string indexing treats surrogate pairs (emoji, many CJK characters) as two indices. A proper palindrome checker must iterate by code point, not by UTF-16 code unit. This is a common source of bugs in production code.</p>\n<p><strong>Single character and empty string:</strong> Both are palindromes by definition. An empty string reads the same forwards and backwards (vacuously true), and a single character trivially satisfies the condition.</p>\n\n<h2>Numeric palindromes</h2>\n<p>Numbers can be palindromic too: 121, 1331, 12321. Numeric palindromes appear in Project Euler problems, competitive programming, and recreational mathematics. The Lychrel conjecture asks whether every natural number eventually becomes a palindrome when you repeatedly reverse and add — 196 has been tested to billions of digits without producing one, but no proof exists either way.</p>\n<table>\n<tr><th>Starting number</th><th>Steps to palindrome</th><th>Result</th></tr>\n<tr><td>56</td><td>1</td><td>56 + 65 = 121</td></tr>\n<tr><td>78</td><td>4</td><td>78 → 165 → 726 → 1353 → 4884</td></tr>\n<tr><td>89</td><td>24</td><td>8,813,200,023,188</td></tr>\n<tr><td>196</td><td>Unknown</td><td>No palindrome found after billions of iterations</td></tr>\n</table>\n\n<h2>Palindromes in DNA</h2>\n<p>Molecular biologists use \"palindrome\" differently: a DNA palindrome is a sequence where the complementary strand reads the same in the opposite direction. The restriction enzyme EcoRI recognises the palindromic sequence GAATTC (complement: CTTAAG, reversed: GAATTC). These biological palindromes are critical to gene editing, CRISPR targeting, and forensic DNA analysis.</p>\n\n<h2>Interview applications</h2>\n<p>Palindrome problems are among the most common in coding interviews because they test string manipulation, edge-case handling, and algorithmic thinking in a compact problem. Variants include: longest palindromic substring (Manacher's algorithm, O(n)), palindrome partitioning (dynamic programming), and checking if a string can become a palindrome with at most one deletion.</p>\n\n<h2>FAQ</h2>\n<p><strong>Is \"Was it a car or a cat I saw?\" a palindrome?</strong><br>Yes — after removing spaces and punctuation and lowering case, it reads \"wasitacaroracatisaw\", which is identical reversed.</p>\n<p><strong>What is the longest known palindrome word?</strong><br>In English, \"tattarrattat\" (coined by James Joyce in Ulysses to imitate a knock on a door) is often cited. In Finnish, \"saippuakivikauppias\" (a soapstone seller) is a naturally occurring 19-letter palindrome.</p>\n<p><strong>Can numbers be checked the same way?</strong><br>Yes. Convert the number to a string and apply the same two-pointer algorithm, or work with digits directly using modular arithmetic.</p>"
  },
  "text-line-sort": {
    "title": "Sort Text Lines — Alphabetical, Numeric, Natural and by Length",
    "description": "Sort lines of text, deduplicate, reverse and shuffle, and understand why item10 comes before item9 and why Zebra sorts before apple.",
    "keywords": "sort lines alphabetically, text line sorter, natural sort order, remove duplicate lines, sort by length, case sensitive sort, locale collation",
    "article": "<h1>Text Line Sorting: Algorithms, Options, and When Each Order Matters</h1>\n<p>Sorting lines of text seems trivial until you encounter locale-sensitive strings, mixed-case entries, numeric prefixes, or trailing whitespace. The right sort order depends on what you are sorting and why — and choosing wrong can produce results that look correct in English but break in German, Japanese, or Arabic.</p>\n\n<h2>Sorting algorithms behind the scenes</h2>\n<p>Most text sorters — including this tool — use a comparison-based sort. The underlying algorithm is typically Timsort (used by Python and JavaScript's V8 engine), which combines merge sort and insertion sort for an average and worst-case time complexity of O(n log n). The critical variable is not the algorithm but the comparison function.</p>\n\n<h2>Comparison options explained</h2>\n<table>\n<tr><th>Sort mode</th><th>What it compares</th><th>Example order</th></tr>\n<tr><td>Lexicographic (ASCII)</td><td>Raw byte values</td><td>Apple, Banana, apple (uppercase before lowercase)</td></tr>\n<tr><td>Case-insensitive</td><td>Lowered strings</td><td>apple, Apple, Banana</td></tr>\n<tr><td>Natural / human sort</td><td>Numeric segments by value</td><td>file1, file2, file10 (not file1, file10, file2)</td></tr>\n<tr><td>Locale-aware (Intl.Collator)</td><td>Language-specific rules</td><td>ä sorts after a in German (DIN 5007-1), but as ae in phonebooks (DIN 5007-2)</td></tr>\n<tr><td>Reverse</td><td>Any of the above, reversed</td><td>Banana, apple, Apple</td></tr>\n<tr><td>Random shuffle</td><td>Random comparator</td><td>Unpredictable each time</td></tr>\n</table>\n\n<h2>Natural sort: the one most people actually want</h2>\n<p>Default lexicographic sort treats \"file10\" as less than \"file2\" because the character \"1\" (ASCII 49) comes before \"2\" (ASCII 50). Natural sort extracts numeric segments and compares them as numbers, producing the order humans expect: file1, file2, file10, file20, file100. Windows Explorer, macOS Finder, and most file managers use natural sort for filenames.</p>\n\n<h2>Locale-aware sorting pitfalls</h2>\n<p>In Swedish, \"ö\" sorts after \"z\". In German, \"ö\" sorts with \"o\". In Turkish, dotless \"ı\" and dotted \"İ\" are distinct letters, and case conversion rules differ from English (lowercase \"I\" is \"ı\", not \"i\"). A text sorter that ignores locale will produce wrong results for any non-ASCII language. JavaScript's <code>Intl.Collator</code> handles this correctly when given the right locale tag.</p>\n\n<h2>Deduplication during sort</h2>\n<p>A common use case is sorting and then removing duplicate lines — the Unix <code>sort -u</code> pattern. This is useful for cleaning email lists, merging log files, and preparing data for diff comparison. The Gen Code Tools line sorter includes a \"remove duplicates\" option that performs both operations in a single pass.</p>\n\n<h2>Performance considerations</h2>\n<table>\n<tr><th>Lines</th><th>Expected sort time (browser, Timsort)</th></tr>\n<tr><td>1,000</td><td>&lt;1 ms</td></tr>\n<tr><td>10,000</td><td>~5 ms</td></tr>\n<tr><td>100,000</td><td>~80 ms</td></tr>\n<tr><td>1,000,000</td><td>~900 ms</td></tr>\n</table>\n<p>For files over 100,000 lines, the browser tab may briefly freeze. The tool uses a Web Worker for large inputs to avoid blocking the UI thread.</p>\n\n<h2>Real-world use cases</h2>\n<p><strong>CSV column extraction:</strong> Copy one column from a spreadsheet, paste into the sorter, sort alphabetically, and remove duplicates to get a clean unique-values list. Faster than writing a formula or opening a database tool.</p>\n<p><strong>Merge conflict resolution:</strong> When two developers add entries to the same list in different orders, sorting both lists and comparing makes the diff trivial.</p>\n<p><strong>SEO keyword lists:</strong> Sort keyword research exports alphabetically to group related terms and spot duplicates that inflated the count.</p>\n\n<h2>FAQ</h2>\n<p><strong>Does the sorter handle tabs and mixed whitespace?</strong><br>Yes. Each line is trimmed of leading/trailing whitespace before comparison. Interior whitespace is preserved in the output.</p>\n<p><strong>Can I sort by a specific column?</strong><br>The line sorter sorts by the entire line. For column-specific sorting, use a CSV-aware tool or spreadsheet.</p>\n<p><strong>Is there a line limit?</strong><br>No hard limit, but performance degrades above 500,000 lines in a browser. For truly massive files, use a command-line tool like GNU <code>sort</code>.</p>"
  },
  "steps-calories": {
    "title": "Steps to Calories Calculator — What 10,000 Steps Actually Burns",
    "description": "Convert step count to calories using weight, stride and walking speed, see the gross and net figures, and where the 10,000-step target came from.",
    "keywords": "steps to calories calculator, calories burned walking, 10000 steps calories, steps to km, net vs gross calories, met walking",
    "article": "<h1>Steps to Calories Converter: How Many Calories Does Walking Actually Burn?</h1>\n<p>The steps-to-calories conversion depends on three variables: your weight, your stride length, and your walking speed. A commonly cited figure — 100 calories per mile, or about 2,000 steps — is a rough average for a 155-pound person on flat ground. The actual number varies by 40–60% depending on individual factors.</p>\n<h2>The conversion formula</h2>\n<p><code>Calories = Steps × Stride Length (m) / 1000 × MET × Weight (kg) / Speed (km/h)</code></p>\n<p>A simpler approximation: <code>Calories ≈ Steps × 0.04 × (Weight in kg / 70)</code>. This assumes an average stride and moderate pace.</p>\n<h2>Calorie burn by step count and weight</h2>\n<table><tr><th>Steps</th><th>60 kg (132 lbs)</th><th>70 kg (154 lbs)</th><th>80 kg (176 lbs)</th><th>90 kg (198 lbs)</th></tr>\n<tr><td>2,000</td><td>56 cal</td><td>66 cal</td><td>75 cal</td><td>84 cal</td></tr>\n<tr><td>5,000</td><td>140 cal</td><td>164 cal</td><td>187 cal</td><td>210 cal</td></tr>\n<tr><td>7,500</td><td>210 cal</td><td>245 cal</td><td>280 cal</td><td>315 cal</td></tr>\n<tr><td>10,000</td><td>280 cal</td><td>327 cal</td><td>374 cal</td><td>420 cal</td></tr>\n<tr><td>15,000</td><td>420 cal</td><td>491 cal</td><td>561 cal</td><td>631 cal</td></tr></table>\n<h2>The 10,000-step target: where it came from</h2>\n<p>The 10,000-step goal originated from a 1965 Japanese marketing campaign for the Manpo-kei pedometer (万歩計 literally means \"10,000-step meter\"). It was not based on clinical research. However, subsequent studies have broadly supported 7,000–10,000 steps as a beneficial daily range. A 2020 JAMA study of 4,840 adults found that participants who walked 8,000+ steps per day had a 51% lower mortality risk than those walking 4,000 steps — but the incremental benefit plateaued above 12,000 steps.</p>\n<h2>Stride length estimation</h2>\n<table><tr><th>Height</th><th>Estimated stride (walking)</th><th>Estimated stride (running)</th></tr>\n<tr><td>5'0\" (152 cm)</td><td>58 cm</td><td>90 cm</td></tr>\n<tr><td>5'6\" (168 cm)</td><td>66 cm</td><td>102 cm</td></tr>\n<tr><td>5'10\" (178 cm)</td><td>71 cm</td><td>110 cm</td></tr>\n<tr><td>6'2\" (188 cm)</td><td>76 cm</td><td>118 cm</td></tr></table>\n<p>These are estimates. To measure your actual stride: walk 10 steps on a flat surface, measure the total distance, and divide by 10. Use the measured value for more accurate calorie calculations.</p>\n<h2>Walking speed and calorie burn</h2>\n<p>Faster walking burns more calories per step because the biomechanical effort increases non-linearly. At 2 mph (slow stroll), the MET value is 2.0. At 3.5 mph (brisk walk), the MET rises to 3.5 — a 75% increase in energy expenditure per unit of time. This is why health guidelines specify \"brisk\" walking, not just any walking.</p>\n<h2>Steps vs. other activity metrics</h2>\n<table><tr><th>Metric</th><th>Strength</th><th>Weakness</th></tr>\n<tr><td>Steps</td><td>Easy to measure; motivating; correlates with general activity</td><td>Ignores intensity, elevation, and non-walking activity</td></tr>\n<tr><td>Active minutes</td><td>Captures intensity; aligns with WHO guidelines (150 min/week)</td><td>Doesn't distinguish walking from vigorous exercise</td></tr>\n<tr><td>Heart rate zones</td><td>Directly measures cardiovascular effort</td><td>Requires a sensor; affected by caffeine, stress, medication</td></tr>\n<tr><td>Calories burned</td><td>Universal energy metric</td><td>Estimated with 15–27% error (Stanford, 2017)</td></tr></table>\n<h2>FAQ</h2>\n<p><strong>Do steps on a treadmill count the same as outdoor steps?</strong><br>Approximately — but outdoor walking on uneven terrain burns 5–10% more calories due to balance adjustments and wind resistance. Incline settings on a treadmill partially compensate.</p>\n<p><strong>Do running steps burn more than walking steps?</strong><br>Per step, running burns slightly more because the vertical displacement is greater. Per mile, running and walking burn similar total calories (about 80–100 kcal per mile), but running covers the mile faster.</p>\n<p><strong>Should I trust my phone's step count?</strong><br>Modern smartphones are reasonably accurate for walking (±5%) but overcount during driving (vibrations register as steps) and undercount when the phone is in a bag rather than a pocket. Dedicated pedometers and fitness bands are more consistent.</p>"
  },
  "fasting-timer": {
    "title": "Fasting Timer — Windows, Protocols and What the Evidence Says",
    "description": "Track an intermittent fasting window across 16:8, 18:6, 20:4 and OMAD, see what happens at each stage, and read an honest summary of what trials actually found.",
    "keywords": "fasting timer, intermittent fasting 16 8, fasting window calculator, omad, 18 6 fasting, autophagy fasting, alternate day fasting",
    "article": "<h1>Intermittent Fasting Timer: Protocols, Physiology, and What the Evidence Actually Shows</h1>\n<p>An intermittent fasting timer tracks your eating and fasting windows and tells you how far through your current fast you are. The tool is simple; the science behind fasting is not. Claims range from credible (improved insulin sensitivity) to exaggerated (reversal of ageing), and understanding which is which requires looking at the actual research.</p>\n<h2>Common fasting protocols</h2>\n<table>\n<tr><th>Protocol</th><th>Fasting window</th><th>Eating window</th><th>Frequency</th></tr>\n<tr><td>16:8 (Leangains)</td><td>16 hours</td><td>8 hours</td><td>Daily</td></tr>\n<tr><td>18:6</td><td>18 hours</td><td>6 hours</td><td>Daily</td></tr>\n<tr><td>20:4 (Warrior Diet)</td><td>20 hours</td><td>4 hours</td><td>Daily</td></tr>\n<tr><td>5:2</td><td>2 days at 500–600 cal</td><td>5 days normal eating</td><td>Weekly</td></tr>\n<tr><td>OMAD (One Meal a Day)</td><td>~23 hours</td><td>~1 hour</td><td>Daily</td></tr>\n<tr><td>Alternate Day Fasting</td><td>36 hours</td><td>12 hours</td><td>Every other day</td></tr>\n</table>\n<h2>What happens physiologically during a fast</h2>\n<table>\n<tr><th>Hours fasted</th><th>Metabolic event</th></tr>\n<tr><td>0–4</td><td>Fed state. Insulin elevated, glucose being used as primary fuel.</td></tr>\n<tr><td>4–8</td><td>Early post-absorptive state. Blood glucose falling, insulin declining.</td></tr>\n<tr><td>8–12</td><td>Glycogen depletion begins. Liver glycogen stores are drawn down.</td></tr>\n<tr><td>12–18</td><td>Fat oxidation increases significantly. Ketone production begins.</td></tr>\n<tr><td>18–24</td><td>Autophagy upregulated (cellular cleanup process). Growth hormone rises.</td></tr>\n<tr><td>24–48</td><td>Deep ketosis. Autophagy peaks. Not recommended without medical guidance.</td></tr>\n</table>\n<h2>The evidence for health benefits</h2>\n<p><strong>Weight loss:</strong> Multiple randomised controlled trials show that intermittent fasting produces weight loss comparable to continuous caloric restriction — not superior. A 2020 meta-analysis in the Annual Review of Nutrition found that the primary mechanism is reduced total caloric intake, not metabolic magic. Fasting is an eating pattern that helps some people eat less, not a metabolic hack.</p>\n<p><strong>Insulin sensitivity:</strong> Time-restricted eating (especially early time-restricted eating, where the eating window ends by mid-afternoon) has shown improvements in insulin sensitivity and fasting glucose in several studies. A 2022 NEJM review noted that these benefits are most consistent in adults with prediabetes or metabolic syndrome.</p>\n<p><strong>Autophagy:</strong> Autophagy — the process by which cells break down and recycle damaged components — is upregulated during fasting. However, measuring autophagy in living humans is technically difficult, and most autophagy research is based on animal models or cell cultures. The popular claim that \"autophagy starts at 16 hours\" is an oversimplification of complex, continuous cellular processes.</p>\n<h2>Who should not fast</h2>\n<p>Pregnant or breastfeeding women, individuals with a history of eating disorders, people with Type 1 diabetes, children and adolescents, and anyone taking medication that requires food. Fasting is a nutritional strategy, not a universal prescription, and it should be discussed with a healthcare provider for anyone in these groups.</p>\n<h2>Practical tips for using the timer</h2>\n<ol>\n<li>Start with 14:10 or 16:8 for the first two weeks — jumping to 20:4 is unsustainable for most people.</li>\n<li>Hydration is critical: water, black coffee, and unsweetened tea do not break a fast.</li>\n<li>Track consistently for at least 30 days before evaluating results.</li>\n<li>If you experience dizziness, persistent hunger, or irritability beyond the first week, shorten the fasting window or stop.</li>\n</ol>\n<h2>FAQ</h2>\n<p><strong>Does coffee break a fast?</strong><br>Black coffee (no sugar, no cream) does not meaningfully affect insulin or caloric intake and is generally considered fast-safe. Adding milk or sweetener technically breaks the fast.</p>\n<p><strong>Can I exercise while fasting?</strong><br>Light to moderate exercise is fine for most people. High-intensity or strength training may benefit from post-workout nutrition, so schedule heavy workouts near the eating window.</p>\n<p><strong>Is fasting better than just eating less?</strong><br>For weight loss, they are equivalent in clinical trials. Fasting may offer additional metabolic benefits (improved circadian rhythm, insulin sensitivity) that continuous restriction does not, but the evidence is still emerging.</p>"
  },
  "decision-matrix": {
    "title": "Decision Matrix Calculator — Weighted Scoring Done Honestly",
    "description": "Score options against weighted criteria to compare them systematically, with a worked job-offer example and a clear account of where weighted scoring misleads.",
    "keywords": "decision matrix calculator, weighted scoring model, pugh matrix, multi criteria decision analysis, compare options objectively, decision making tool",
    "article": "<h1>Decision Matrix: How to Make Complex Choices Systematically</h1>\n<p>A decision matrix — also called a weighted scoring model, Pugh matrix, or criteria-based decision analysis — replaces gut feeling with structured comparison. You list your options as rows, your criteria as columns, score each option against each criterion, and multiply by weights. The option with the highest total score wins. The method does not make the decision for you; it makes your reasoning visible and challengeable.</p>\n\n<h2>When to use a decision matrix</h2>\n<p>Use a matrix when you have three or more options, three or more criteria that matter, and the stakes are high enough to warrant 15 minutes of structured thinking. Common applications include job offer comparison, vendor selection, technology stack evaluation, city relocation, and product feature prioritisation.</p>\n\n<h2>Step-by-step construction</h2>\n<table>\n<tr><th>Step</th><th>Action</th><th>Example (choosing a laptop)</th></tr>\n<tr><td>1</td><td>List options</td><td>MacBook Air M3, ThinkPad X1, Dell XPS 15</td></tr>\n<tr><td>2</td><td>List criteria</td><td>Battery life, weight, screen quality, price, keyboard</td></tr>\n<tr><td>3</td><td>Assign weights (must total 100%)</td><td>Battery 25%, Weight 20%, Screen 20%, Price 20%, Keyboard 15%</td></tr>\n<tr><td>4</td><td>Score each option per criterion (1–10)</td><td>See matrix below</td></tr>\n<tr><td>5</td><td>Multiply scores by weights and sum</td><td>See totals below</td></tr>\n</table>\n\n<h2>Worked example: laptop comparison</h2>\n<table>\n<tr><th>Criterion</th><th>Weight</th><th>MacBook Air</th><th>ThinkPad X1</th><th>Dell XPS 15</th></tr>\n<tr><td>Battery life</td><td>25%</td><td>9 (2.25)</td><td>7 (1.75)</td><td>6 (1.50)</td></tr>\n<tr><td>Weight</td><td>20%</td><td>9 (1.80)</td><td>8 (1.60)</td><td>6 (1.20)</td></tr>\n<tr><td>Screen quality</td><td>20%</td><td>8 (1.60)</td><td>8 (1.60)</td><td>9 (1.80)</td></tr>\n<tr><td>Price</td><td>20%</td><td>6 (1.20)</td><td>5 (1.00)</td><td>7 (1.40)</td></tr>\n<tr><td>Keyboard</td><td>15%</td><td>7 (1.05)</td><td>9 (1.35)</td><td>7 (1.05)</td></tr>\n<tr><td><strong>Total</strong></td><td></td><td><strong>7.90</strong></td><td><strong>7.30</strong></td><td><strong>6.95</strong></td></tr>\n</table>\n<p>The MacBook Air scores highest, driven by its battery and weight advantages. But notice that the ThinkPad wins on keyboard quality — if you adjusted the keyboard weight from 15% to 30%, the outcome would change. This sensitivity is a feature, not a bug: the matrix makes your priorities explicit and testable.</p>\n\n<h2>Common mistakes</h2>\n<p><strong>Too many criteria:</strong> More than 7 criteria dilute the weights so much that every option scores similarly. Limit criteria to the 5–7 factors that actually differentiate the options.</p>\n<p><strong>Anchoring on the first score:</strong> Once you score Option A as 8/10 on price, you unconsciously calibrate all other price scores relative to it. Score all options on one criterion at a time, moving across the row, not down the column.</p>\n<p><strong>Ignoring dealbreakers:</strong> A decision matrix is a compensatory model — a high score on one criterion can compensate for a low score on another. If any criterion is a hard requirement (e.g., \"must weigh under 3 lbs\"), filter out disqualified options before building the matrix.</p>\n\n<h2>Variations</h2>\n<p><strong>Pugh Matrix:</strong> Uses a baseline option (the current choice or market leader) and scores others as better (+1), same (0), or worse (−1) relative to the baseline. Faster than absolute scoring and useful for early-stage screening.</p>\n<p><strong>AHP (Analytic Hierarchy Process):</strong> Uses pairwise comparison of criteria to derive mathematically consistent weights. More rigorous than subjective weight assignment but significantly more time-consuming.</p>\n\n<h2>FAQ</h2>\n<p><strong>How do I assign weights objectively?</strong><br>Start by ranking criteria from most to least important, then distribute 100 points across them. If two criteria feel equally important, give them equal points. The ranking forces trade-offs that direct assignment often avoids.</p>\n<p><strong>What scoring scale should I use?</strong><br>1–5 is too coarse for more than 3 options; 1–10 provides enough resolution for most decisions. Some practitioners use 1–100, but the additional precision is usually false precision.</p>\n<p><strong>Can I use a decision matrix for group decisions?</strong><br>Yes — have each participant score independently, then average the scores. Discuss the largest disagreements, as they reveal different assumptions or values that should be resolved before choosing.</p>"
  },
  "random-decision": {
    "title": "Random Decision Maker — Fair Picks, and When to Actually Use One",
    "description": "Pick randomly from a list, flip a coin or roll dice with genuinely unbiased randomness, and understand which decisions randomness is the correct tool for.",
    "keywords": "random decision maker, random picker, coin flip, decide for me, weighted random choice, modulo bias, random number generator fairness",
    "article": "<h1>When randomness is the right answer</h1><p>It sounds like an abdication. It is not, for a specific and narrow class of decisions: <strong>the ones where the options are close in value and the deliberation costs more than the difference between them</strong>.</p><p>If two restaurants are roughly equally good, twenty minutes of discussion is a pure loss. If two features are both defensible, a week of debate costs more than picking the slightly worse one and shipping. The philosophical version is Buridan ass — an animal placed exactly between two identical bales of hay starves while deciding. The practical version is a coin.</p><p>There is also a genuinely interesting empirical finding here. An economist ran a large experiment in which people facing real dilemmas — quit the job, end the relationship, move city — were assigned an outcome by coin flip. Among those who followed it, the ones who <em>made the change</em> reported higher happiness six months later than those who stayed. The interpretation the author offered is that people are systematically biased toward the status quo, so when a decision is genuinely marginal, the change is more often the better bet than we feel it is. That is one study on a self-selected sample, so hold it loosely — but it suggests that if you are agonising, inertia is not the neutral option it appears to be.</p><h2>Where randomness is the wrong answer</h2><p>Anything irreversible, anything high-stakes, anything where you have not actually gathered the available information, and anything where the options are not close. Randomising a medical decision, a large financial commitment or a hire is not decisiveness. And critically: a random pick <strong>does not legitimise a bad list</strong>. If every option is poor, the tool returns a poor option with a clean conscience attached.</p><p>A useful test before using it: if the coin gives you the answer you did not want and you feel relief rather than resistance, the decision was genuinely marginal. If you immediately want to flip again, it was not marginal at all — you already knew, and what you wanted was permission.</p><h2>Is the randomness actually fair</h2><p>Two technical issues determine whether a picker is genuinely unbiased.</p><p><strong>The source.</strong> The standard <code>Math.random</code> in browsers is a pseudo-random generator: fast, statistically fine for choosing lunch, but deterministic and not suitable where an adversary might predict it. For anything where fairness must be defensible — a prize draw, a raffle — a cryptographic source such as <code>crypto.getRandomValues</code> is the correct choice.</p><p><strong>Modulo bias.</strong> This is the subtle one. To pick from 6 options, code often takes a large random integer and applies the remainder operator. But if the generator range is not an exact multiple of 6, the low-numbered outcomes occur slightly more often than the high ones, because the leftover partial block at the top of the range only covers some of the options.</p><p>With a 32-bit range and 6 options the bias is around one part in 700 million — utterly irrelevant for a dice roll. With a small range or many options it becomes measurable. The proper fix is <strong>rejection sampling</strong>: discard any value that falls in the incomplete final block and draw again. It costs an occasional extra draw and produces a perfectly uniform result.</p><h2>Weighted picks</h2><p>Sometimes you want unequal odds — a 3 in 10 chance for one option. The standard technique sums the weights, draws a number in that total range, then walks the list subtracting weights until the remainder goes negative:</p><table><tr><th>Option</th><th>Weight</th><th>Cumulative</th><th>Range</th></tr><tr><td>A</td><td>5</td><td>5</td><td>0 – 4.99</td></tr><tr><td>B</td><td>3</td><td>8</td><td>5 – 7.99</td></tr><tr><td>C</td><td>2</td><td>10</td><td>8 – 9.99</td></tr></table><p>A draw of 6.4 lands in B range. Weights do not need to sum to any particular number, since they are normalised by the total.</p><h2>Honest limits</h2><p>Randomness has no memory. Five heads in a row does not make tails more likely on the sixth — that is the gambler fallacy, and it is the single most persistent misunderstanding about random processes. A fair picker will produce runs and clusters that feel wrong; genuinely random sequences look far lumpier than people expect, which is why deliberately spread-out sequences feel more random and are not.</p><p>Also, small samples say nothing. Picking the same name three times from a list of five is entirely unremarkable — the probability is 1 in 25 for any specific name, and something surprising happens most of the time.</p><h2>Questions people actually ask</h2><h3>Can I re-roll if I do not like the result?</h3><p>You can, but then you are not using a random picker — you are using it as a prompt to notice your preference, which is a legitimate but different tool. Decide in advance whether the result binds you.</p><h3>Is a physical coin more random than software?</h3><p>Not meaningfully, and physical coins have small measurable biases from their weight distribution and the spin imparted. A cryptographic generator is more uniform than any coin.</p><h3>How do I pick several without repeats?</h3><p>Shuffle the whole list with a Fisher-Yates shuffle and take the first n. Repeatedly drawing and rejecting duplicates works but gets slow as the list empties.</p><h3>Are my options stored?</h3><p>No. The list you enter is used only in your browser and nothing is transmitted or saved.</p>"
  },
  "priority-matrix": {
    "title": "Priority Matrix — Urgent Against Important, Used Properly",
    "description": "Sort tasks into the four urgency and importance quadrants, see where time actually goes against where it should, and understand what the matrix cannot resolve.",
    "keywords": "priority matrix, eisenhower matrix, urgent important matrix, quadrant 2 time management, task prioritisation, do schedule delegate delete",
    "article": "<h1>Priority Matrix: Eisenhower, MoSCoW, and Impact/Effort — Choosing the Right Framework</h1>\n<p>A priority matrix is a visual framework for deciding what to work on first. The basic idea is universal: plot tasks on two axes, then work the quadrant that produces the most value. But different frameworks use different axes, and choosing the wrong framework for your context produces misleading priorities.</p>\n<h2>The Eisenhower Matrix</h2>\n<table><tr><th></th><th>Urgent</th><th>Not Urgent</th></tr>\n<tr><td><strong>Important</strong></td><td>Do immediately</td><td>Schedule deliberately</td></tr>\n<tr><td><strong>Not Important</strong></td><td>Delegate</td><td>Eliminate</td></tr></table>\n<p>Popularised by Stephen Covey in <em>The 7 Habits of Highly Effective People</em> (attributed to President Eisenhower), this matrix separates urgency from importance. The key insight: most people spend too much time in the \"urgent but not important\" quadrant (reactive email, unnecessary meetings) and too little in the \"important but not urgent\" quadrant (strategic planning, relationship building, skill development). The matrix makes this imbalance visible.</p>\n<h2>The Impact/Effort Matrix</h2>\n<table><tr><th></th><th>Low Effort</th><th>High Effort</th></tr>\n<tr><td><strong>High Impact</strong></td><td>Quick wins — do first</td><td>Major projects — plan carefully</td></tr>\n<tr><td><strong>Low Impact</strong></td><td>Fill-ins — do if time allows</td><td>Avoid — poor ROI</td></tr></table>\n<p>This framework is used heavily in product management and agile development. The y-axis measures the value delivered; the x-axis measures the resources required. \"Quick wins\" (high impact, low effort) should always be done first. \"Thankless tasks\" (low impact, high effort) should be deprioritised or killed.</p>\n<h2>MoSCoW Method</h2>\n<table><tr><th>Category</th><th>Meaning</th><th>Guideline</th></tr>\n<tr><td>Must Have</td><td>Non-negotiable for this delivery</td><td>60% of effort</td></tr>\n<tr><td>Should Have</td><td>Important but not critical</td><td>20% of effort</td></tr>\n<tr><td>Could Have</td><td>Desirable if resources allow</td><td>20% of effort</td></tr>\n<tr><td>Won't Have</td><td>Explicitly out of scope</td><td>0% (this round)</td></tr></table>\n<p>MoSCoW is particularly useful for project scoping and sprint planning because the \"Won't Have\" category is explicitly acknowledged rather than silently deferred. Naming what you are not doing is as important as naming what you are doing — it prevents scope creep and sets stakeholder expectations.</p>\n<h2>When to use which framework</h2>\n<table><tr><th>Scenario</th><th>Best framework</th><th>Why</th></tr>\n<tr><td>Personal time management</td><td>Eisenhower</td><td>Separates your reactive habits from proactive priorities</td></tr>\n<tr><td>Product feature prioritisation</td><td>Impact/Effort</td><td>Optimises for value delivered per engineering hour</td></tr>\n<tr><td>Project scoping / sprint planning</td><td>MoSCoW</td><td>Creates explicit scope boundaries with stakeholder buy-in</td></tr>\n<tr><td>Startup strategy</td><td>RICE scoring</td><td>Adds Reach, Impact, Confidence, and Effort for quantitative ranking</td></tr></table>\n<h2>Common prioritisation mistakes</h2>\n<p><strong>Everything is \"high priority\":</strong> If every task is urgent and important, nothing is — the matrix becomes useless. Force-rank: no more than 20% of tasks should be in the top priority quadrant.</p>\n<p><strong>Confusing urgency with importance:</strong> A ringing phone is urgent but may not be important. A long-term business strategy is important but never urgent — until it becomes a crisis. The Eisenhower Matrix exists precisely to expose this confusion.</p>\n<p><strong>Ignoring the bottom-right quadrant:</strong> Items classified as \"major projects\" (high impact, high effort) often get indefinitely deferred in favour of quick wins. This is rational in the short term but catastrophic over years — it means the organisation never invests in transformative work.</p>\n<h2>FAQ</h2>\n<p><strong>How many items should a priority matrix contain?</strong><br>5–15 items per session. Fewer than 5 doesn't require a framework; more than 15 becomes overwhelming and defeats the purpose of visual prioritisation.</p>\n<p><strong>How often should I reprioritise?</strong><br>Weekly for personal tasks, per sprint for product teams, quarterly for strategic initiatives. The cadence should match the rate of change in your context.</p>\n<p><strong>Can I combine frameworks?</strong><br>Yes — use Eisenhower for personal tasks and Impact/Effort for team projects. Different scopes benefit from different lenses.</p>"
  },
  "habit-streak": {
    "title": "Habit Streak Tracker — What the Research Says About Chains",
    "description": "Track consecutive days and consistency percentage, and learn why 21 days is a myth, why one missed day does not matter, and where streaks turn against you.",
    "keywords": "habit streak tracker, how long to form a habit, 66 days habit, dont break the chain, habit consistency percentage, 21 day myth",
    "article": "<h1>Habit Streak Tracker: The Psychology of Consecutive Days and When Streaks Help vs. Hurt</h1>\n<p>A habit streak counts the number of consecutive days you have performed a specific behaviour. The streak concept powers Duolingo's retention engine, Snapchat's engagement metrics, and Jerry Seinfeld's famous \"don't break the chain\" productivity method. The psychology is well-documented: streaks exploit loss aversion, create social commitment, and build automaticity — but they can also backfire.</p>\n<h2>Why streaks work: the behavioural science</h2>\n<table><tr><th>Mechanism</th><th>Research</th><th>Effect on habits</th></tr>\n<tr><td>Loss aversion</td><td>Kahneman & Tversky, 1979</td><td>Losing a 30-day streak feels worse than starting a new one feels good — so you do the habit to avoid the loss</td></tr>\n<tr><td>Consistency principle</td><td>Cialdini, 2001</td><td>Once you identify as \"someone who exercises daily,\" breaking the streak conflicts with self-image</td></tr>\n<tr><td>Variable reward schedule</td><td>Skinner, 1957</td><td>Milestones (10, 30, 100 days) provide intermittent rewards that sustain motivation</td></tr>\n<tr><td>Automaticity</td><td>Lally et al., 2010</td><td>After 66 days on average (range: 18–254), the behaviour becomes automatic and requires less willpower</td></tr></table>\n<h2>The 66-day myth</h2>\n<p>The frequently cited \"21 days to form a habit\" is a misquotation of Maxwell Maltz's 1960 observation about plastic surgery patients adjusting to new faces. The actual research (Lally et al., 2009, published in the European Journal of Social Psychology) found that habit formation takes 18 to 254 days, with a median of 66 days. Simple habits (drinking water) form faster; complex habits (exercising) take longer. Missing a single day did not significantly impact long-term habit formation.</p>\n<h2>When streaks become counterproductive</h2>\n<p><strong>All-or-nothing thinking:</strong> A broken streak can trigger complete abandonment (\"I missed day 47, so I might as well give up\"). Research on the \"what-the-hell effect\" (Cochran & Tesser, 1996) shows that perceived failure on a self-control goal often leads to overconsumption in the opposite direction.</p>\n<p><strong>Quality degradation:</strong> To maintain a writing streak, some people write one sentence and count it as \"done.\" The streak is preserved but the practice quality has collapsed. Minimum viable effort preserves the metric while eroding the purpose.</p>\n<p><strong>Guilt and burnout:</strong> Streaks can transform an enjoyable activity into an obligation. If maintaining the streak causes anxiety on rest days, the tool is working against you.</p>\n<h2>Design principles for effective streak tracking</h2>\n<p><strong>Allow \"rest days\" without breaking:</strong> Some streak trackers let you designate 1–2 rest days per week that don't count against the streak. This mirrors how gym routines actually work — recovery is part of the programme.</p>\n<p><strong>Track consistency rate, not just streaks:</strong> Doing the habit 26 out of 30 days (87% consistency) is better than a 14-day streak followed by complete abandonment. The Gen Code Tools streak tracker shows both metrics.</p>\n<p><strong>Celebrate milestones:</strong> 7 days, 30 days, 100 days, 365 days. Each milestone provides a dopamine reward that reinforces the behaviour.</p>\n<h2>Habit stacking</h2>\n<p>BJ Fogg's \"Tiny Habits\" method links a new habit to an existing one: \"After I pour my morning coffee [existing habit], I will write in my journal for 5 minutes [new habit].\" Pairing the streak tracker with a specific trigger increases the likelihood of remembering and performing the habit.</p>\n<h2>FAQ</h2>\n<p><strong>Does missing one day ruin everything?</strong><br>No. Lally's research found that missing a single day had no measurable impact on long-term habit formation. The \"never miss twice\" rule (attributed to James Clear) is a practical heuristic: one miss is a rest; two misses is the start of a new (bad) pattern.</p>\n<p><strong>What's a good starter streak goal?</strong><br>7 days. It's short enough to feel achievable, long enough to build initial momentum. After 7 days, extend to 30. After 30, the habit is likely establishing itself and the streak becomes self-sustaining.</p>\n<p><strong>Should I track multiple habits simultaneously?</strong><br>Start with one or two. Research on ego depletion (Baumeister et al., 1998) suggests that willpower is a limited resource — though this finding is debated in recent literature. Practically, tracking fewer habits increases the success rate for each.</p>"
  },
  "goal-calculator": {
    "title": "Goal Calculator — Break a Target Into a Daily Rate",
    "description": "Convert a large goal into the daily or weekly rate that reaches it, add realistic slack, and see where linear planning breaks down.",
    "keywords": "goal calculator, daily target calculator, break down a goal, words per day calculator, weekly goal planning, planning fallacy buffer",
    "article": "<h1>Goal Calculator: Breaking Down Big Targets Into Daily and Weekly Actions</h1>\n<p>A goal calculator takes a large target (save $20,000, read 50 books, run a marathon) and breaks it into the daily or weekly actions required to achieve it by a specific date. The arithmetic is division — but the insight is in seeing how manageable (or how unrealistic) the daily requirement actually is.</p>\n<h2>The core formula</h2>\n<p><code>Daily Action = (Target − Current Progress) / Days Remaining</code></p>\n<table><tr><th>Goal</th><th>Target</th><th>Current</th><th>Days left</th><th>Daily action needed</th></tr>\n<tr><td>Save money</td><td>$20,000</td><td>$3,500</td><td>365</td><td>$45.21/day</td></tr>\n<tr><td>Read books</td><td>50 books</td><td>12 books</td><td>214</td><td>1 book per 5.6 days</td></tr>\n<tr><td>Lose weight</td><td>20 lbs</td><td>0 lbs lost</td><td>180</td><td>0.78 lbs/week (safe rate)</td></tr>\n<tr><td>Learn vocabulary</td><td>3,000 words</td><td>400 words</td><td>365</td><td>7.1 words/day</td></tr></table>\n<h2>Why this reframing works</h2>\n<p>\"Save $20,000\" feels overwhelming. \"$45 per day\" feels manageable. The psychology is well-documented: Locke and Latham's Goal Setting Theory (1990, 2002) found that specific, challenging goals with clear metrics produce 20–25% better performance than vague intentions like \"do your best.\" The goal calculator converts vague aspirations into specific daily targets.</p>\n<h2>The SMART framework applied</h2>\n<table><tr><th>Letter</th><th>Meaning</th><th>Calculator helps?</th></tr>\n<tr><td>S</td><td>Specific</td><td>Yes — exact target number</td></tr>\n<tr><td>M</td><td>Measurable</td><td>Yes — daily/weekly metrics</td></tr>\n<tr><td>A</td><td>Achievable</td><td>Yes — reveals if the daily action is realistic</td></tr>\n<tr><td>R</td><td>Relevant</td><td>No — that's your decision</td></tr>\n<tr><td>T</td><td>Time-bound</td><td>Yes — deadline is an input</td></tr></table>\n<h2>Adjusting for non-linear progress</h2>\n<p>Not all goals progress linearly. Language learning follows a logarithmic curve (rapid early progress, slower later). Weight loss follows a step function (plateaus are normal). Marathon training follows a periodised plan with deliberate rest weeks. The calculator provides a linear baseline; adjust your expectations based on the goal's typical progression pattern.</p>\n<h2>Accountability and tracking</h2>\n<p>Research on implementation intentions (Gollwitzer, 1999) shows that people who specify when, where, and how they will act on a goal are 2–3 times more likely to follow through. Combining the goal calculator with a habit tracker or calendar creates the specificity that implementation intentions require.</p>\n<h2>When the daily number reveals an impossible goal</h2>\n<p>If the calculator shows you need to save $200/day to hit your target, you have three options: extend the deadline, reduce the target, or increase your income/output rate. The calculator's value is in revealing this impossibility early, before six months of half-hearted effort and inevitable disappointment.</p>\n<h2>FAQ</h2>\n<p><strong>Should I include rest days?</strong><br>Yes. If you plan to work toward your goal 5 days per week, divide by the number of active days, not calendar days. Sustainable goals account for rest and recovery.</p>\n<p><strong>What if I fall behind?</strong><br>Recalculate with your current progress and remaining time. The new daily requirement will be higher, which either motivates a push or reveals that the timeline needs adjustment.</p>\n<p><strong>Can I use this for team goals?</strong><br>Yes. Divide the daily target by team size to get individual contributions. This makes team accountability visible and equitable.</p>"
  },
  "meeting-agenda": {
    "title": "Meeting Agenda Builder — Timeboxed Items With Named Outcomes",
    "description": "Build an agenda where every item has a type, an owner, a timebox and a defined outcome, and understand why an agenda alone does not fix a bad meeting.",
    "keywords": "meeting agenda builder, meeting agenda template, timeboxed agenda, decision vs discussion, meeting outcomes, effective meeting structure",
    "article": "<h1>Why Most Meeting Agendas Fail — and a Structure That Works</h1>\n<p>Walk into any office and you will find the same complaint repeated floor after floor: this meeting should have been an email. Yet the fix is rarely cancelling the meeting — it is building the agenda so the meeting cannot drift. The distinction matters, because an unstructured meeting of five people at an average salary costs around $400 per hour in loaded labour, and most organisations run dozens each week.</p>\n\n<h2>Four fields per agenda item, not one</h2>\n<p>Most agendas are a list of topics, and a bare topic tells you what will be talked about without defining when the item is finished. A structured agenda item needs four fields that work together:</p>\n<table>\n<tr><th>Field</th><th>Purpose</th><th>Example</th></tr>\n<tr><td>Type</td><td>Decision, discussion, or information</td><td>Decision</td></tr>\n<tr><td>Owner</td><td>One named person, not a team</td><td>Priya</td></tr>\n<tr><td>Timebox</td><td>Maximum minutes for the item</td><td>10</td></tr>\n<tr><td>Outcome</td><td>What exists at the end that did not exist at the start</td><td>Launch date selected and recorded</td></tr>\n</table>\n<p>The type field does the most work. A decision item requires the decision-maker present and the options prepared in advance. A discussion item requires the people with context and no expectation of immediate resolution. An information item — and this is where real savings hide — usually needs no meeting at all; a written document covers it.</p>\n\n<h2>A worked example: a 45-minute product review</h2>\n<table>\n<tr><th>Item</th><th>Type</th><th>Owner</th><th>Min</th><th>Outcome</th></tr>\n<tr><td>Silent read of the proposal</td><td>Info</td><td>All</td><td>8</td><td>Everyone has read the document</td></tr>\n<tr><td>Pick launch date: 14 or 28 Oct</td><td>Decision</td><td>Priya</td><td>10</td><td>Date chosen and entered into the project plan</td></tr>\n<tr><td>Pricing objections from beta users</td><td>Discussion</td><td>Sam</td><td>12</td><td>Objections listed and rank-ordered</td></tr>\n<tr><td>Owner for the migration risk</td><td>Decision</td><td>Priya</td><td>5</td><td>One name assigned to the risk register</td></tr>\n<tr><td>Actions and owners read back</td><td>Info</td><td>Chair</td><td>5</td><td>Written actions confirmed by the room</td></tr>\n<tr><td colspan=\"3\"><strong>Total</strong></td><td><strong>40</strong></td><td>In a 45-minute booking</td></tr>\n</table>\n<p>Two deliberate design choices appear. The total is 40 minutes inside a 45-minute calendar slot, leaving genuine slack — Parkinson's law is real, and an agenda that fills the slot exactly always overruns. The meeting opens with silent reading rather than a slide presentation, a practice popularised at Amazon: reading the document in the room guarantees a prepared audience without relying on anyone having done pre-work, and it surfaces sharper questions than a slide walkthrough can.</p>\n\n<h2>The single highest-value line in any agenda</h2>\n<p>Put the purpose at the top in one sentence, phrased as what will be different afterwards. Not \"discuss Q4 planning\" but \"choose between the two Q4 scopes so engineering can start on Monday.\" If you cannot write that sentence, the meeting is not ready. This test alone cancels a surprising share of recurring meetings, and cancelling an unnecessary meeting is worth more than any improvement to how that meeting runs.</p>\n\n<h2>Common agenda anti-patterns</h2>\n<table>\n<tr><th>Anti-pattern</th><th>Why it fails</th><th>Fix</th></tr>\n<tr><td>Round-table status updates</td><td>Eight people sit while one talks; the others check email</td><td>Move updates to a shared document; use the meeting only for blockers</td></tr>\n<tr><td>\"Any other business\"</td><td>Open-ended items expand to fill remaining time</td><td>End the meeting early instead; AOB goes to the next agenda if needed</td></tr>\n<tr><td>Back-to-back items with no owner</td><td>Nobody prepares; discussion spins</td><td>Assign one named owner per item who comes prepared</td></tr>\n<tr><td>Information items presented live</td><td>Reading is 3-4 times faster than listening; live presentation wastes the group's time</td><td>Circulate the document before or at the top of the meeting</td></tr>\n</table>\n\n<h2>How to handle recurring meetings</h2>\n<p>Recurring meetings are where hidden costs accumulate. A weekly 30-minute sync with six people is 156 hours per year — nearly a month of full-time work. Apply two rules: first, every recurring meeting must have a standing agenda template with defined outcomes, not just topic headings. Second, review the guest list quarterly and remove anyone who has not spoken or been referenced in the last four sessions.</p>\n\n<h2>Research on meeting effectiveness</h2>\n<p>A 2022 Microsoft study of 31,000 workers found that the average employee spends 252 percent more time in meetings than before the pandemic. Separately, a Harvard Business Review analysis found that 71 percent of senior managers rated meetings as unproductive. The data consistently shows that preparation — not duration, not technology, not facilitation style — is the strongest predictor of whether attendees rate a meeting as valuable. A structured agenda is the single most effective form of meeting preparation.</p>\n\n<h2>Honest limits of agendas</h2>\n<p>An agenda is necessary but not sufficient. It cannot fix a meeting where the wrong people are invited, where the decision-maker is absent, or where the pre-read was never written. It works best when combined with three other disciplines: a clear purpose statement at the top, a named facilitator who enforces timeboxes, and written actions distributed within 30 minutes of the meeting ending.</p>\n\n<h2>FAQ</h2>\n<p><strong>How long should a meeting agenda be?</strong><br>Match the number of items to the meeting length. A 30-minute meeting handles three to four items well; a 60-minute meeting handles five to six. More than six items usually means the meeting should be split.</p>\n<p><strong>Should you share the agenda in advance?</strong><br>Always, at least 24 hours before. Sharing the agenda gives attendees time to prepare and, critically, to flag items that are unnecessary or that need different attendees.</p>\n<p><strong>What if an important topic arises mid-meeting?</strong><br>Acknowledge it, assign an owner, and add it to the next meeting's agenda with a proper timebox. Letting unplanned topics hijack a structured meeting destroys the discipline that makes agendas valuable.</p>"
  },
  "focus-timer": {
    "title": "Focus Timer — Pomodoro and the Intervals That Suit the Task",
    "description": "Run focused work intervals with breaks, compare 25:5 against longer blocks, and understand why the standard interval is arbitrary and when it works against you.",
    "keywords": "focus timer, pomodoro timer, 25 minute timer, deep work blocks, 52 17 rule, ultradian rhythm work, attention residue",
    "article": "<h1>Focus Timer: The Science of Timed Work Sessions and Why They Outperform Open-Ended Effort</h1>\n<p>A focus timer structures work into timed intervals — typically 25 minutes of focused work followed by a 5-minute break (the Pomodoro Technique) — based on the cognitive science principle that attention is a depletable resource that recovers with brief rest. The tool is simple; the psychology behind it is well-supported.</p>\n<h2>Why timed sessions work</h2>\n<p>Attention research identifies three mechanisms that make timed work sessions more productive than open-ended effort:</p>\n<table>\n<tr><th>Mechanism</th><th>Research basis</th><th>Practical effect</th></tr>\n<tr><td>Parkinson's Law</td><td>\"Work expands to fill the time available\" (Parkinson, 1955)</td><td>A 25-minute constraint forces prioritisation and reduces procrastination</td></tr>\n<tr><td>Vigilance decrement</td><td>Attention quality declines after 20–25 minutes of sustained focus (Mackworth, 1948)</td><td>Brief breaks reset attentional resources</td></tr>\n<tr><td>Zeigarnik Effect</td><td>Incomplete tasks create mental tension that promotes continuation (Zeigarnik, 1927)</td><td>Starting a timer creates commitment; the break feels earned rather than lazy</td></tr>\n</table>\n<h2>Common timer protocols</h2>\n<table>\n<tr><th>Protocol</th><th>Work interval</th><th>Short break</th><th>Long break (after N cycles)</th></tr>\n<tr><td>Classic Pomodoro</td><td>25 min</td><td>5 min</td><td>15–30 min after 4 cycles</td></tr>\n<tr><td>52/17 (DeskTime study)</td><td>52 min</td><td>17 min</td><td>—</td></tr>\n<tr><td>90-minute ultradian</td><td>90 min</td><td>20 min</td><td>—</td></tr>\n<tr><td>Deep work blocks</td><td>60–120 min</td><td>15–20 min</td><td>—</td></tr>\n</table>\n<p>The 52/17 split comes from a DeskTime study that tracked the habits of the top 10% most productive users of their time-tracking software. The 90-minute cycle aligns with ultradian rhythms — natural oscillations in alertness that occur roughly every 90 minutes throughout the day.</p>\n<h2>What to do during breaks</h2>\n<p>The purpose of the break is to restore attentional resources. Effective break activities: walking, stretching, looking at distant objects (reduces eye strain), drinking water. Counterproductive break activities: checking social media (which depletes the same attentional resources), reading email (which introduces new cognitive load), and skipping the break entirely.</p>\n<h2>Research on focus and deep work</h2>\n<p>Cal Newport's <em>Deep Work</em> (2016) argues that the ability to concentrate without distraction is becoming both rarer and more valuable. A 2023 University of California study found that the average office worker is interrupted every 3 minutes and 5 seconds. After each interruption, it takes an average of 23 minutes and 15 seconds to return to the original task. A focus timer with notifications silenced creates a protected block that reduces interruption frequency.</p>\n<h2>Focus timer and ADHD</h2>\n<p>Timed work sessions are particularly effective for people with ADHD because they externalise the time management function that ADHD impairs. The timer provides the external structure that the internal executive function struggles to maintain. Many ADHD coaches recommend starting with shorter intervals (10–15 minutes) and gradually increasing as the habit develops.</p>\n<h2>How to use this tool</h2>\n<ol>\n<li>Choose your work interval (start with 25 minutes if unsure)</li>\n<li>Set the break length (5 minutes for short breaks, 15 for long)</li>\n<li>Silence all notifications on your phone and computer</li>\n<li>Work on a single task until the timer rings — do not switch tasks</li>\n<li>Take the full break, even if you feel you could keep going</li>\n<li>After 4 cycles, take an extended break of 15–30 minutes</li>\n</ol>\n<h2>FAQ</h2>\n<p><strong>What if I'm in flow when the timer rings?</strong><br>If you are deeply focused and productive, extend the session to a natural stopping point and then take a slightly longer break. The timer is a guide, not a mandate. However, consistently ignoring the timer defeats its purpose.</p>\n<p><strong>Does this work for creative tasks?</strong><br>Yes, with adjustment. Creative tasks often require longer ramp-up time. Use 45- or 90-minute blocks instead of 25 minutes. The break structure still applies — creativity benefits from incubation periods.</p>\n<p><strong>Should I track how many sessions I complete?</strong><br>Yes — tracking completed sessions per day gives you an objective measure of productive time. Most knowledge workers complete 8–12 Pomodoro sessions per day, which translates to 3.5–5 hours of genuinely focused work. This is consistent with research suggesting that 4 hours of deep work per day is the sustainable maximum for most people.</p>"
  },
  "cognitive-load": {
    "title": "Cognitive Load Estimator — How Much You Are Actually Holding",
    "description": "Estimate the mental load of your current open work against real working-memory limits, and learn why the famous seven-item figure was revised down to about four.",
    "keywords": "cognitive load calculator, working memory capacity, millers law 7 plus minus 2, cowan four chunks, mental load, extraneous cognitive load, context switching cost",
    "article": "<h1>Cognitive Load Calculator: Understanding Your Brain's Working Memory Limits</h1>\n<p>Cognitive load is the total amount of mental effort being used by working memory at any given moment. The concept comes from educational psychology (John Sweller, 1988), but it applies to every domain where humans process information: software interfaces, workplace multitasking, study sessions, and decision-making under pressure.</p>\n<h2>The three types of cognitive load</h2>\n<table><tr><th>Type</th><th>Definition</th><th>Example</th><th>Can you reduce it?</th></tr>\n<tr><td>Intrinsic</td><td>Complexity inherent in the material</td><td>Learning calculus is harder than learning arithmetic</td><td>Not directly — it's fixed by the topic</td></tr>\n<tr><td>Extraneous</td><td>Load caused by poor design or instruction</td><td>A confusing UI, a badly structured lecture</td><td>Yes — this is where design improvements help</td></tr>\n<tr><td>Germane</td><td>Load devoted to building mental models (learning)</td><td>Making connections between new and existing knowledge</td><td>You want to increase this</td></tr></table>\n<p>The total of all three types must not exceed working memory capacity (approximately 4 ± 1 items according to Cowan's 2001 revision of Miller's original 7 ± 2). The goal of good design — whether in software, teaching, or communication — is to minimise extraneous load so that capacity is available for intrinsic and germane processing.</p>\n<h2>Working memory capacity: what the research shows</h2>\n<p>Miller's famous 1956 paper proposed 7 ± 2 items, but subsequent research (Cowan, 2001; Oberauer, 2002) suggests the true limit is closer to 4 items for unrelated chunks. Chunking — grouping items into meaningful units — extends effective capacity. A phone number like 4155551234 is 10 digits (exceeding capacity) but 3 chunks: 415-555-1234 (within capacity).</p>\n<h2>How cognitive load affects daily work</h2>\n<table><tr><th>Activity</th><th>Estimated cognitive load</th><th>Impact</th></tr>\n<tr><td>Reading email while on a call</td><td>High extraneous</td><td>Both tasks performed poorly</td></tr>\n<tr><td>Writing code with Slack open</td><td>High extraneous</td><td>Error rate doubles (Microsoft Research)</td></tr>\n<tr><td>Studying with spaced retrieval</td><td>High germane</td><td>Better long-term retention</td></tr>\n<tr><td>Using a well-designed form</td><td>Low extraneous</td><td>Faster completion, fewer errors</td></tr></table>\n<h2>Reducing cognitive load in practice</h2>\n<p><strong>In software design:</strong> Progressive disclosure (showing only relevant options), consistent patterns, sensible defaults, and clear error messages reduce extraneous load. Every unnecessary UI element consumes working memory.</p>\n<p><strong>In communication:</strong> Bullet points, headings, tables, and the inverted pyramid structure (conclusion first, details after) reduce the load on the reader. A wall of text requires the reader to build their own structure — that's extraneous load transferred from writer to reader.</p>\n<p><strong>In meetings:</strong> Pre-read documents reduce the cognitive load of real-time processing. Agendas reduce the load of wondering \"what are we doing here?\" Timeboxes reduce the load of uncertainty about duration.</p>\n<h2>The science of multitasking</h2>\n<p>True multitasking — performing two cognitive tasks simultaneously — is a myth for tasks requiring attention. What people call multitasking is rapid task switching, which incurs a \"switch cost\" of 10–40% of productive time (Rubinstein, Meyer & Evans, 2001). The cognitive load calculator estimates this cost based on the number of concurrent tasks and their individual complexity.</p>\n<h2>FAQ</h2>\n<p><strong>Is cognitive load the same as stress?</strong><br>No — high cognitive load can be enjoyable (a challenging puzzle in flow state is high intrinsic + high germane load). Stress is an emotional response that may result from sustained overload but is a separate phenomenon.</p>\n<p><strong>Can I increase my working memory capacity?</strong><br>Working memory training (n-back tasks) shows limited transfer to real-world tasks. More effective strategies: reduce extraneous load through better tools and habits, and increase chunking ability through expertise in your domain.</p>\n<p><strong>How is cognitive load measured?</strong><br>In research: subjective ratings (NASA-TLX), physiological measures (pupil dilation, fMRI), and dual-task performance. In practice: task completion time and error rate are reliable proxies.</p>"
  },
  "meeting-worth-it": {
    "title": "Is This Meeting Worth It — A Test Before You Send the Invite",
    "description": "Score a proposed meeting against its cost, whether a decision exists, and whether async would be slower, with an honest case for when meetings beat writing.",
    "keywords": "is this meeting necessary, meeting worth it test, async vs meeting, meeting cost benefit, should i schedule a meeting, decision latency",
    "article": "<h1>Was That Meeting Worth It? A Framework for Evaluating Meeting ROI</h1>\n<p>Every meeting is an investment of collective time. A 30-minute meeting with six people at a loaded cost of $75 per hour spends $225 of organisational resources. The question is whether the meeting produced at least $225 in value — and most organisations never ask.</p>\n\n<h2>The meeting ROI formula</h2>\n<p><code>Meeting ROI = (Value of Outcomes − Cost of Meeting) / Cost of Meeting × 100%</code></p>\n<p>The cost side is straightforward: attendees × loaded hourly rate × duration. The value side is harder to quantify but not impossible. A meeting that produces a signed decision avoids days or weeks of email threads. A meeting that unblocks a team saves idle engineering time. A meeting that reaches no conclusion and generates no action items produced zero value at a definite cost.</p>\n\n<h2>Outcome types and their approximate value</h2>\n<table>\n<tr><th>Outcome type</th><th>Value signal</th><th>Approximate worth</th></tr>\n<tr><td>Binding decision made</td><td>High — eliminates uncertainty</td><td>2–10× meeting cost</td></tr>\n<tr><td>Blocker removed</td><td>High — restores productivity</td><td>Idle team cost per hour × hours saved</td></tr>\n<tr><td>Action items assigned</td><td>Medium — progress enabled</td><td>Depends on follow-through rate</td></tr>\n<tr><td>Information shared</td><td>Low — could have been async</td><td>Near zero marginal value over email</td></tr>\n<tr><td>No outcomes documented</td><td>Zero</td><td>Negative (cost incurred, nothing gained)</td></tr>\n</table>\n\n<h2>The five-question post-meeting audit</h2>\n<p>After any meeting, ask five questions. If you answer \"no\" to three or more, the meeting was likely not worth the cost:</p>\n<ol>\n<li>Did the meeting produce at least one documented decision or action item?</li>\n<li>Were the right people in the room — and only the right people?</li>\n<li>Could the same outcome have been achieved asynchronously in less total person-time?</li>\n<li>Did the meeting start and end on time?</li>\n<li>Would you schedule this meeting again knowing the outcome?</li>\n</ol>\n\n<h2>Research on meeting productivity</h2>\n<p>A 2022 Harvard Business Review study surveyed 182 senior managers and found that 71% rated meetings as unproductive and inefficient, 65% said meetings kept them from completing their own work, and 64% said meetings came at the expense of deep thinking. Yet the average number of meetings per week has increased steadily since 2020, driven by remote work and the ease of scheduling video calls.</p>\n\n<h2>The opportunity cost nobody calculates</h2>\n<p>Meeting cost calculators measure direct cost (labour × time), but the larger cost is opportunity cost — what each attendee would have accomplished instead. A senior engineer's most valuable work happens in uninterrupted blocks of 90 minutes or more. A mid-morning meeting fragments the morning into two sub-optimal blocks. The engineering output lost is real but invisible on any dashboard.</p>\n\n<h2>When meetings are genuinely worth it</h2>\n<p><strong>Conflict resolution:</strong> When two teams disagree on priorities or approach, a live conversation with a decision-maker present resolves the issue in 30 minutes. The same conflict in Slack can persist for days.</p>\n<p><strong>Complex planning:</strong> Multi-dependency project planning benefits from real-time whiteboarding where participants can challenge assumptions and adjust sequences immediately.</p>\n<p><strong>Relationship building:</strong> Early-stage team formation, new-hire onboarding, and cross-team introductions generate social capital that increases future collaboration speed. These meetings are hard to quantify but clearly valuable.</p>\n\n<h2>Alternatives to low-value meetings</h2>\n<table>\n<tr><th>Meeting type</th><th>Alternative</th><th>Time savings</th></tr>\n<tr><td>Status update</td><td>Async standup (Slack, email)</td><td>80–90%</td></tr>\n<tr><td>Information broadcast</td><td>Recorded video (Loom, etc.)</td><td>60–70%</td></tr>\n<tr><td>Feedback review</td><td>Shared document with inline comments</td><td>50–60%</td></tr>\n<tr><td>Brainstorm</td><td>Async idea board (Miro, FigJam) → live synthesis session</td><td>30–40%</td></tr>\n</table>\n\n<h2>FAQ</h2>\n<p><strong>How do I calculate loaded cost if HR won't share salary data?</strong><br>Use industry benchmarks. For US tech companies, a reasonable estimate is $50–$90/hour for individual contributors and $100–$180/hour for managers and directors.</p>\n<p><strong>Should I include the facilitator's prep time?</strong><br>Yes. If someone spends 30 minutes preparing the agenda and materials, that is 30 minutes of labour cost that should be included in the meeting's total cost.</p>\n<p><strong>What is a good meeting-to-deep-work ratio?</strong><br>Research suggests that knowledge workers are most productive when meetings occupy no more than 30–40% of their work week. Above 50%, productivity and job satisfaction decline measurably.</p>"
  },
  "procrastination-cost": {
    "title": "Procrastination Cost Calculator — What Delay Actually Charges You",
    "description": "Put figures on the cost of putting something off, including compounding financial loss, the rushed-work penalty, and why procrastination is an emotional problem rather than a scheduling one.",
    "keywords": "procrastination cost calculator, cost of delay, cost of waiting to invest, procrastination is emotional regulation, present bias, zeigarnik effect",
    "article": "<h1>Procrastination Cost Calculator: What Delay Actually Costs in Money, Time, and Compound Opportunity</h1>\n<p>Procrastination is not free. Every day a task is delayed has a cost — sometimes financial (late fees, lost interest), sometimes operational (blocked teammates, missed windows), and always in opportunity cost (what you could have done instead). The procrastination cost calculator quantifies this cost to convert an abstract \"I should do this\" into a concrete \"every day I delay costs me $X.\"</p>\n<h2>The formula</h2>\n<p><code>Procrastination Cost = Daily Opportunity Cost × Days Delayed + Direct Penalties</code></p>\n<table><tr><th>Scenario</th><th>Daily opportunity cost</th><th>Days delayed</th><th>Direct penalty</th><th>Total cost</th></tr>\n<tr><td>Filing taxes late</td><td>Interest accrual: ~$1.40/day per $10K owed</td><td>30</td><td>5% failure-to-file penalty</td><td>$542+</td></tr>\n<tr><td>Delaying investment of $10,000</td><td>$1.64/day at 6% annual return</td><td>90</td><td>None</td><td>$148</td></tr>\n<tr><td>Not cancelling unused subscription</td><td>$0.50/day ($15/month)</td><td>180</td><td>None</td><td>$90</td></tr>\n<tr><td>Postponing a job application</td><td>Salary gap: $220/day (at $80K/year)</td><td>14</td><td>Position may fill</td><td>$3,080+</td></tr></table>\n<h2>The compound cost of investment delay</h2>\n<p>Delaying a $10,000 investment by one year at 7% annual return costs $700 in the first year alone. Over 20 years, that one-year delay costs $3,870 (the future value of $700 compounded at 7% for 20 years). Over 30 years, it costs $7,612. The cost of procrastination compounds alongside the returns you miss.</p>\n<h2>Why people procrastinate: the research</h2>\n<p>Piers Steel's meta-analysis of 216 studies (Psychological Bulletin, 2007) found that procrastination is driven by four factors, captured in the Temporal Motivation Theory equation:</p>\n<p><code>Motivation = (Expectancy × Value) / (Impulsiveness × Delay)</code></p>\n<table><tr><th>Factor</th><th>Effect</th><th>Intervention</th></tr>\n<tr><td>Low expectancy (self-doubt)</td><td>\"I probably can't do this well\"</td><td>Break task into smaller, achievable steps</td></tr>\n<tr><td>Low value (boring task)</td><td>\"This isn't interesting or rewarding\"</td><td>Pair with reward; connect to larger goal</td></tr>\n<tr><td>High impulsiveness (distraction)</td><td>\"I'll do it after this video\"</td><td>Remove distractions; use a focus timer</td></tr>\n<tr><td>High delay (distant deadline)</td><td>\"It's not due for weeks\"</td><td>Create intermediate deadlines; use the procrastination cost calculator</td></tr></table>\n<h2>Procrastination is not laziness</h2>\n<p>Research by Timothy Pychyl (Carleton University) and Fuschia Sirois (University of Sheffield) frames procrastination as an emotion regulation problem, not a time management problem. People procrastinate to avoid negative emotions associated with the task (boredom, anxiety, frustration). The task gets done eventually — but only after the emotional cost of delay (guilt, stress) exceeds the emotional cost of doing the task. Making the cost of delay visible and quantitative can shift this tipping point earlier.</p>\n<h2>Practical strategies backed by research</h2>\n<ol>\n<li><strong>The two-minute rule:</strong> If a task takes less than two minutes, do it immediately. The overhead of scheduling and remembering exceeds the cost of just doing it (David Allen, Getting Things Done).</li>\n<li><strong>Implementation intentions:</strong> \"I will [task] at [time] in [location].\" This specific commitment doubles follow-through rates (Gollwitzer, 1999).</li>\n<li><strong>Temptation bundling:</strong> Pair an unpleasant task with something enjoyable. Listen to a favourite podcast only while doing administrative work (Milkman, 2014).</li>\n</ol>\n<h2>FAQ</h2>\n<p><strong>Is some procrastination productive?</strong><br>Yes — \"structured procrastination\" (John Perry, Stanford) involves doing useful secondary tasks while avoiding the primary one. And some tasks genuinely benefit from incubation time. But chronic procrastination on important tasks is costly by any measure.</p>\n<p><strong>How accurate is the cost calculation?</strong><br>Direct costs (late fees, missed returns) are precise. Opportunity costs are estimates based on your hourly rate and the task's value. The number doesn't need to be exact — its purpose is to make the abstract cost of delay concrete and motivating.</p>\n<p><strong>Does the cost calculator help with ADHD-related procrastination?</strong><br>It can help by externalising the consequences that ADHD brains struggle to internalise. However, ADHD procrastination has neurological underpinnings that go beyond motivation — executive function support tools, accountability partners, and professional coaching are often more effective than cost quantification alone.</p>"
  },
  "email-subject-scorer": {
    "title": "Email Subject Line Scorer — Length, Spam Triggers and Truncation",
    "description": "Check a subject line against mobile truncation limits, spam trigger patterns and specificity, and understand why open-rate benchmarks stopped being reliable in 2021.",
    "keywords": "email subject line checker, subject line length, spam trigger words, email open rate, subject line truncation mobile, apple mail privacy protection",
    "article": "<h1>Email Subject Line Scorer: What Makes People Open (and What Makes Them Delete)</h1>\n<p>The subject line is the most important sentence in any email. Mailchimp's analysis of 12 billion emails found that subject lines account for 47% of the decision to open or ignore. Yet most subject lines are written in seconds, as an afterthought, after spending 30 minutes crafting the body. The email subject line scorer evaluates your subject against research-backed criteria and suggests improvements.</p>\n<h2>Scoring criteria and weights</h2>\n<table>\n<tr><th>Factor</th><th>Weight</th><th>Why it matters</th></tr>\n<tr><td>Length (6–10 words ideal)</td><td>20%</td><td>Mobile screens truncate at ~40 characters; 78% of email is read on mobile</td></tr>\n<tr><td>Specificity (numbers, names, dates)</td><td>20%</td><td>Specific subjects outperform vague ones by 22% in A/B tests (Campaign Monitor)</td></tr>\n<tr><td>Urgency without spam triggers</td><td>15%</td><td>\"Limited time\" works; \"ACT NOW!!!\" triggers spam filters</td></tr>\n<tr><td>Personalisation</td><td>15%</td><td>Subjects with the recipient's name or company have 26% higher open rates (Experian)</td></tr>\n<tr><td>Clarity of value proposition</td><td>15%</td><td>The reader must know what they get by opening within 2 seconds</td></tr>\n<tr><td>Absence of spam triggers</td><td>15%</td><td>ALL CAPS, excessive punctuation, and words like \"free\" or \"guarantee\" reduce deliverability</td></tr>\n</table>\n<h2>High-scoring vs. low-scoring examples</h2>\n<table>\n<tr><th>Subject line</th><th>Score</th><th>Why</th></tr>\n<tr><td>Your Q3 report is ready — 3 key takeaways inside</td><td>92</td><td>Specific, clear value, moderate length, no spam triggers</td></tr>\n<tr><td>Quick question about Thursday's meeting</td><td>85</td><td>Short, specific day, conversational tone</td></tr>\n<tr><td>Newsletter #47</td><td>38</td><td>No value proposition, no reason to open</td></tr>\n<tr><td>🔥🔥🔥 AMAZING DEAL DON'T MISS OUT!!!</td><td>12</td><td>All caps, excessive emoji, spam triggers, no specificity</td></tr>\n</table>\n<h2>Optimal subject line length</h2>\n<p>Research from Marketo found that subject lines with 7 words and 41 characters produce the highest engagement rates. Below 4 words, the subject feels incomplete. Above 12 words, mobile truncation cuts the message. The sweet spot is 6–10 words, which balances specificity with scannability.</p>\n<h2>Words that help and words that hurt</h2>\n<p><strong>Power words that increase opens:</strong> you, your, new, how, why, quick, update, invitation, confirmed, results, [name], [number].</p>\n<p><strong>Spam trigger words that decrease deliverability:</strong> free, guarantee, no obligation, act now, limited time offer, congratulations, winner, click here, urgent. These words alone don't guarantee spam classification, but they contribute to spam score in combination with other signals.</p>\n<h2>A/B testing subject lines</h2>\n<p>The only way to know what works for your specific audience is to test. Send variant A to 15% of your list, variant B to another 15%, wait 2–4 hours, then send the winner to the remaining 70%. Most email platforms (Mailchimp, ConvertKit, Brevo) automate this process. Test one variable at a time: length, specificity, personalisation, or emoji use — never all at once.</p>\n<h2>B2B vs. B2C differences</h2>\n<p>B2B emails perform better with formal, specific subjects that reference the recipient's company or industry. B2C emails can use more emotional language, emoji, and urgency. A 2023 Litmus report found that B2B open rates average 21.3% while B2C averages 19.7%, suggesting that B2B audiences are slightly more responsive — likely because they receive fewer promotional emails.</p>\n<h2>FAQ</h2>\n<p><strong>Should I use emoji in subject lines?</strong><br>Data is mixed. A 2022 Return Path study found that emoji increase open rates by 3–5% in B2C but decrease them by 2% in B2B. Use sparingly (one emoji maximum) and test with your audience.</p>\n<p><strong>Does the preview text matter?</strong><br>Yes — the preview text (preheader) is the second most-read element after the subject. Treat it as a continuation of the subject line, not a repeat. Together, subject + preview should form a complete value proposition.</p>\n<p><strong>Can I reuse high-performing subject lines?</strong><br>Yes, with modifications. Exact repeats trigger spam filters and bore subscribers. Change the specifics (numbers, dates) while keeping the structure.</p>"
  },
  "negotiation-power": {
    "title": "Negotiation Power Score — Where Leverage Actually Comes From",
    "description": "Assess your leverage across alternatives, time pressure, information and replaceability, and see why improving your alternatives beats every tactic at the table.",
    "keywords": "negotiation power calculator, batna, best alternative to negotiated agreement, zopa, negotiation leverage, reservation price, anchoring first offer",
    "article": "<h1>Negotiation Power Score: Assessing Your Position Before You Negotiate</h1>\n<p>Negotiation power — also called bargaining leverage — is determined by factors that exist before anyone sits down at the table. Your BATNA (Best Alternative to a Negotiated Agreement), information asymmetry, time pressure, and relationship dynamics collectively determine how much leverage you have. The negotiation power calculator evaluates these factors and produces a score that tells you whether to push hard, compromise, or walk away.</p>\n<h2>The five components of negotiation power</h2>\n<table><tr><th>Component</th><th>Weight</th><th>What it measures</th></tr>\n<tr><td>BATNA strength</td><td>30%</td><td>How good is your alternative if this negotiation fails?</td></tr>\n<tr><td>Information advantage</td><td>20%</td><td>Do you know more about market rates, competitor offers, or the other party's constraints?</td></tr>\n<tr><td>Time pressure differential</td><td>20%</td><td>Who needs a deal sooner? The party under time pressure concedes more.</td></tr>\n<tr><td>Relationship leverage</td><td>15%</td><td>Does the other party value the relationship beyond this transaction?</td></tr>\n<tr><td>Scarcity of alternatives</td><td>15%</td><td>How many other options does the other party have?</td></tr></table>\n<h2>BATNA: the single most important concept</h2>\n<p>Coined by Fisher and Ury in <em>Getting to Yes</em> (1981), BATNA is your best course of action if the current negotiation fails. A job candidate with two competing offers has a strong BATNA. A candidate with no other prospects has a weak one. The strength of your BATNA determines your walk-away point — the minimum acceptable outcome below which you prefer the alternative.</p>\n<p>Improving your BATNA before negotiating is often more effective than improving your negotiation tactics during the conversation. Create alternatives: apply to more jobs, get competing bids, develop in-house capabilities. Every viable alternative strengthens your position.</p>\n<h2>Information is power — but sharing it strategically is more powerful</h2>\n<p>Knowing the other party's constraints (budget ceiling, deadline pressure, competitive alternatives) lets you frame proposals that fit within their limits while maximising your outcome. But negotiation research (Galinsky & Mussweiler, 2001) also shows that making the first offer anchors the negotiation in your favour — which requires revealing information. The skill is in revealing enough to anchor without revealing so much that you lose leverage.</p>\n<h2>Time pressure as leverage</h2>\n<p>The party who needs an agreement sooner is at a disadvantage because they cannot afford to walk away or extend the process. Strategies: if you're under time pressure, don't reveal it. If the other party is under time pressure, slow down — patience becomes a negotiating tool.</p>\n<h2>Scoring interpretation</h2>\n<table><tr><th>Score range</th><th>Position</th><th>Strategy</th></tr>\n<tr><td>80–100</td><td>Strong leverage</td><td>Push for your ideal outcome; make the first offer to anchor high</td></tr>\n<tr><td>60–79</td><td>Moderate leverage</td><td>Negotiate firmly but be prepared to compromise on secondary issues</td></tr>\n<tr><td>40–59</td><td>Balanced</td><td>Focus on creative solutions (expanding the pie) rather than claiming a larger share</td></tr>\n<tr><td>20–39</td><td>Weak leverage</td><td>Improve your BATNA before negotiating; delay if possible</td></tr>\n<tr><td>0–19</td><td>Very weak</td><td>Consider whether this negotiation is worth entering at all</td></tr></table>\n<h2>FAQ</h2>\n<p><strong>Can I improve my score before negotiating?</strong><br>Yes — and you should. The most effective improvements are: getting competing offers (BATNA), researching market rates (information), and removing artificial deadlines (time pressure).</p>\n<p><strong>Does a high score guarantee a good outcome?</strong><br>No. Power is potential; execution matters. Poor communication, emotional reactions, or failing to listen can waste strong leverage.</p>\n<p><strong>Is negotiation power zero-sum?</strong><br>Not necessarily. Integrative negotiation (expanding the pie) can increase both parties' power by finding solutions that create value neither party anticipated.</p>"
  },
  "life-roi": {
    "title": "Life ROI Calculator — Purchases Priced in Hours of Your Life",
    "description": "Convert a price into hours of your life using your real hourly wage after tax, commute and work costs, and see which spending genuinely returns time.",
    "keywords": "life roi calculator, real hourly wage, price in hours of work, your money or your life, cost in hours, time value of purchases",
    "article": "<h1>Life ROI Calculator: Measuring the Return on How You Spend Your Time</h1>\n<p>Return on Investment is a financial concept: (gain − cost) / cost × 100%. Life ROI applies the same logic to non-financial decisions by assigning approximate monetary or utility values to how you spend your time. A $50 gym membership used 20 times per month has a higher ROI than a $200 course never completed. The calculator makes these comparisons explicit.</p>\n<h2>The framework</h2>\n<p><code>Life ROI = (Value Gained − Total Cost) / Total Cost × 100%</code></p>\n<p>Total cost includes money spent plus the opportunity cost of time. Value gained includes direct benefits (income increase, health improvement) and indirect benefits (enjoyment, stress reduction).</p>\n<h2>Worked examples</h2>\n<table><tr><th>Activity</th><th>Cost (money + time value)</th><th>Estimated value gained</th><th>ROI</th></tr>\n<tr><td>Learning a high-demand skill (e.g., SQL)</td><td>$200 course + 40 hours × $30/hr = $1,400</td><td>$8,000 salary increase over 2 years</td><td>471%</td></tr>\n<tr><td>Gym membership (used regularly)</td><td>$600/year + 156 hours × $30/hr = $5,280</td><td>$3,000 saved health costs + quality of life</td><td>−43% (but health is non-negotiable)</td></tr>\n<tr><td>Streaming subscription (used daily)</td><td>$180/year</td><td>365 hours of entertainment valued at $5/hr = $1,825</td><td>914%</td></tr>\n<tr><td>Online course (never completed)</td><td>$400</td><td>$0</td><td>−100%</td></tr></table>\n<h2>Why opportunity cost matters more than sticker price</h2>\n<p>The most expensive part of most activities is not the money — it's the time. A \"free\" webinar that takes 2 hours costs $60–$120 in opportunity cost for a professional earning $30–$60 per hour. If the webinar delivers no actionable value, its real cost is $60–$120, not $0.</p>\n<h2>The 10,000-hour investment</h2>\n<p>Malcolm Gladwell popularised the idea that mastery requires 10,000 hours of deliberate practice. At $40/hour opportunity cost, 10,000 hours represents a $400,000 investment. The question is whether the mastery produces returns that justify this cost. For a professional musician, surgeon, or elite athlete, the answer is often yes. For a casual hobbyist, the calculation is different — and that's fine, because not everything needs to have positive financial ROI.</p>\n<h2>Categories where Life ROI analysis helps</h2>\n<p><strong>Education:</strong> A $100,000 degree that increases lifetime earnings by $1,000,000 has a 900% ROI. A $100,000 degree that leads to the same career as a $10,000 certification has a much lower ROI. The ROI calculator doesn't tell you what to value — it clarifies what you're paying and what you're getting.</p>\n<p><strong>Health:</strong> Preventive health activities (exercise, dental checkups, sleep optimisation) have extremely high ROI when measured against the cost of reactive healthcare. A $100/month gym membership is cheaper than a single emergency room visit.</p>\n<p><strong>Relationships:</strong> Time invested in close relationships has strong evidence of improving longevity and well-being (Harvard Study of Adult Development, 75+ years of data). The ROI is not financial but is measurable in life satisfaction and health outcomes.</p>\n<h2>Limitations of Life ROI</h2>\n<p>Not everything valuable is measurable, and not everything measurable is valuable. Using ROI to evaluate every life decision leads to an exhausting optimisation mindset that ignores intrinsic motivation, serendipity, and the value of activities done purely for enjoyment. The calculator is a lens, not a life philosophy.</p>\n<h2>FAQ</h2>\n<p><strong>How do I value my time?</strong><br>Start with your hourly income as a baseline. If you earn $60,000/year, your time is worth approximately $30/hour. Some people use their freelance rate or the cost of hiring someone to do the task instead.</p>\n<p><strong>Can ROI be applied to leisure activities?</strong><br>Yes, but the \"return\" is subjective enjoyment, stress relief, or social connection rather than money. If an activity brings consistent enjoyment at a reasonable cost, the ROI is positive by your own valuation.</p>\n<p><strong>What if an activity has delayed returns?</strong><br>Discount future returns appropriately. A skill learned today that pays off in 5 years is worth less in present value than one that pays off immediately. Use a discount rate of 5–10% per year as a rough guide.</p>"
  },
  "decision-flip": {
    "title": "Decision Flip — Using a Coin to Reveal What You Already Prefer",
    "description": "Assign two options to a coin, then use your reaction to the result as the data, plus the reversibility, 10-10-10 and pre-mortem tests that come first.",
    "keywords": "decision flip, coin flip decision, regret minimisation, 10 10 10 rule, reversible decision, one way door decision, pre mortem",
    "article": "<h1>Decision Coin Flip: The Psychology of Random Choice (and When It's Genuinely Useful)</h1>\n<p>The decision coin flip is not about letting chance decide — it is about using randomness to reveal what you actually want. The moment the coin is in the air, most people discover they are hoping for one outcome over the other. That hope is the decision. The coin is the tool that surfaces it.</p>\n<h2>How the tool works</h2>\n<p>Enter two (or more) options. The tool randomly selects one. You then rate your emotional response: relief, disappointment, or indifference. If you feel relief, the random choice aligned with your preference. If you feel disappointed, the other option is what you actually want. If you feel indifferent, the options are genuinely equivalent and random selection is efficient.</p>\n<h2>The psychological mechanism</h2>\n<table><tr><th>Reaction to result</th><th>What it reveals</th><th>Action</th></tr>\n<tr><td>Relief</td><td>You wanted this option all along</td><td>Choose this option with confidence</td></tr>\n<tr><td>Disappointment</td><td>You wanted the other option</td><td>Choose the other option</td></tr>\n<tr><td>Indifference</td><td>The options are genuinely equal</td><td>Accept the random result — further deliberation wastes time</td></tr></table>\n<h2>When random choice is genuinely optimal</h2>\n<p><strong>Low-stakes decisions:</strong> What to eat for lunch, which movie to watch, which route to take to work. The cognitive cost of deliberating exceeds the benefit of choosing optimally. Research by Sheena Iyengar (Columbia) found that excessive choice reduces satisfaction — the famous \"jam study\" showed that shoppers presented with 24 jam varieties were less likely to buy than those presented with 6.</p>\n<p><strong>Breaking analysis paralysis:</strong> When two options are roughly equivalent and you've been deliberating for more than 10 minutes, the marginal value of additional thinking approaches zero. A random choice ends the deliberation and frees cognitive resources for more important decisions.</p>\n<p><strong>Fair allocation:</strong> Splitting tasks, assigning presentation order, or choosing who goes first in a game. Randomness is objectively fair and perceived as fair, avoiding interpersonal conflict.</p>\n<h2>When random choice is inappropriate</h2>\n<p><strong>High-stakes irreversible decisions:</strong> Career changes, major purchases, medical treatment choices. These warrant structured decision-making (decision matrices, pro/con lists, consultation with experts).</p>\n<p><strong>Ethical decisions:</strong> Right and wrong are not coin-flip territory. Ethical dilemmas require principled reasoning, not randomisation.</p>\n<p><strong>Decisions with available data:</strong> If data exists that distinguishes the options (reviews, statistics, expert recommendations), using it is strictly better than randomising.</p>\n<h2>The paradox of choice</h2>\n<p>Barry Schwartz's <em>The Paradox of Choice</em> (2004) argues that more options lead to worse decisions and lower satisfaction. \"Maximisers\" (people who try to find the best option) experience more anxiety and regret than \"satisficers\" (people who choose the first good-enough option). The coin flip is a satisficing tool — it short-circuits the maximiser's endless comparison loop.</p>\n<h2>Randomness in professional contexts</h2>\n<p>Google famously used random A/B testing to settle debates between designers (testing 41 shades of blue for a link colour). When experts disagree and data is ambiguous, a randomised test produces an empirical answer faster than continued debate. The coin flip is the simplest version of this principle.</p>\n<h2>FAQ</h2>\n<p><strong>Is the digital coin truly random?</strong><br>The tool uses cryptographic randomness (crypto.getRandomValues in JavaScript), which is computationally indistinguishable from true randomness for practical purposes. It is not a physical coin flip, but it is unbiased.</p>\n<p><strong>Can I flip for more than two options?</strong><br>Yes — enter multiple options and the tool selects one at random with equal probability. For weighted choices (where some options should be more likely), use the weighted random decision tool instead.</p>\n<p><strong>What if I keep flipping until I get the answer I want?</strong><br>That is the tool working exactly as intended. The repeated flipping reveals your preference. Choose the option you keep hoping for and stop flipping.</p>"
  },
  "name-value": {
    "title": "Name Value Calculator — The Arithmetic, and What It Does Not Predict",
    "description": "Compute a name value under Pythagorean, Chaldean and ordinal systems, see the neat mathematical reason two of them always agree, and read an honest account of what numerology can tell you.",
    "keywords": "name value calculator, numerology name number, pythagorean numerology, chaldean numerology, digital root, gematria, forer effect",
    "article": "<h1>The systems</h1><p>Every name-number method maps letters to digits and sums them. There are three common mappings, and they disagree.</p><p><strong>Ordinal:</strong> A = 1 through Z = 26.</p><p><strong>Pythagorean</strong> cycles 1 to 9 across the alphabet:</p><table><tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th></tr><tr><td>A J S</td><td>B K T</td><td>C L U</td><td>D M V</td><td>E N W</td><td>F O X</td><td>G P Y</td><td>H Q Z</td><td>I R</td></tr></table><p><strong>Chaldean</strong> uses 1 to 8 only, with an irregular mapping said to derive from sound rather than alphabet position, and it reserves 9 as never assigned to a letter.</p><h2>A worked example</h2><p>Take MARIA.</p><ul><li><strong>Ordinal:</strong> 13 + 1 + 18 + 9 + 1 = 42, reduced 4 + 2 = <strong>6</strong></li><li><strong>Pythagorean:</strong> 4 + 1 + 9 + 9 + 1 = 24, reduced 2 + 4 = <strong>6</strong></li><li><strong>Chaldean:</strong> 4 + 1 + 2 + 1 + 1 = 9 → <strong>9</strong></li></ul><h2>Why the first two always agree — a real piece of mathematics</h2><p>That the ordinal and Pythagorean results match is not coincidence, and the reason is the most interesting thing on this page.</p><p>Repeatedly summing digits until one remains gives the <strong>digital root</strong>, and the digital root of any number equals that number <strong>modulo 9</strong>, with multiples of 9 giving 9 rather than 0. This is the old accountancy trick called casting out nines, and it works because 10 leaves remainder 1 when divided by 9, so every place value contributes its digit unchanged.</p><p>Now look at the Pythagorean table: it assigns each letter its alphabet position reduced mod 9. A is 1 and J is the tenth letter, also 1. R is eighteenth and gets 9, which is 18 mod 9 expressed as 9 instead of 0.</p><p>So the Pythagorean sum is congruent to the ordinal sum mod 9 — and since the final reduction is itself a mod 9 operation, <strong>the two systems can never produce different answers</strong>. Chaldean differs only because its mapping is not alphabet position mod 9.</p><p>A practical consequence: any anagram has the identical value, since addition is commutative. MARIA, AMIRA and RAIMA all give 6. Whatever the number is supposed to describe, it cannot distinguish between names built from the same letters.</p><h2>Master numbers and other conventions</h2><p>Most traditions leave 11, 22 and sometimes 33 unreduced, calling them master numbers. Practitioners also distinguish the full-name value from the vowels-only figure and the consonants-only figure, and they disagree about whether to use the birth name, the current legal name, or the name you actually go by.</p><p>That last disagreement is worth sitting with, because it has no resolution within the system.</p><h2>What this can honestly tell you</h2><p>Nothing about your personality, future, compatibility or fortune. There is no evidence that name numbers predict anything about a person, and no proposed mechanism by which the Latin alphabet position of letters chosen by your parents could influence your character.</p><p>The reason readings nonetheless feel accurate is well studied and has a name. In a classic 1948 demonstration, students completed a personality test and were each handed what they believed was an individual profile. Every student received the <em>same</em> text, assembled from vague statements, and they rated it as highly accurate — averaging over 4 out of 5. This is the <strong>Forer effect</strong>, and it works because statements like <em>you have a great deal of unused capacity</em> or <em>at times you are outgoing and at other times reserved</em> are true of nearly everyone while feeling personally observed.</p><p>Add confirmation bias — remembering the parts that fit and forgetting the parts that did not — and a system with nine possible outputs describing eight billion people will produce hits constantly.</p><h2>Further honest limits</h2><ul><li><strong>It only works in one alphabet.</strong> A name written in Arabic, Devanagari, Cyrillic or Han characters has no Latin position, so any value depends entirely on how it was transliterated. Change the romanisation and the number changes. A system describing something real would not depend on spelling conventions.</li><li><strong>Names change.</strong> Marriage, migration, nicknames and legal changes all alter the number, which raises the unanswerable question of which one was the true one.</li><li><strong>Diacritics and non-letters are dropped</strong> by every implementation, discarding information the name actually carries.</li></ul><p>Treat this as what it is: a small piece of number theory with a long cultural history, and an entertaining thing to compute. It is not a basis for decisions about people, relationships, hiring or anything else with consequences.</p><h2>Questions people actually ask</h2><h3>Which system is correct?</h3><p>Neither, in any testable sense. Chaldean is often presented as older and therefore more authentic; age is not evidence. They are different conventions producing different numbers.</p><h3>Should I use my full name or the one I use daily?</h3><p>Practitioners disagree, which is itself informative. If you are doing this for interest, try both and notice that you prefer whichever reading is more flattering.</p><h3>Is gematria the same thing?</h3><p>Related but distinct. Gematria is a Hebrew tradition in which letters have established numeric values used for textual interpretation, with a long scholarly history. Modern name numerology borrows the arithmetic idea and applies it to Latin letters, which is a much more recent invention.</p><h3>Is my name stored anywhere?</h3><p>No. Whatever you type is processed in your browser and nothing is transmitted or saved.</p>"
  }
}