Methodology
Every formula on TrueScalers is implemented from a named authority rather than from memory, held in a pure function with no dependency on the interface, and covered by unit tests asserting known-correct values and boundary conditions. This page lists the derivation and the source for each of the 40 tools, and the 95 references they collectively rely on.
How a calculation reaches the site
- 01
Locate the authoritative definition
The formula is taken from a standards body, a regulator, or the original peer-reviewed publication — never from another calculator site. Where a method is named after its authors, such as Mifflin-St Jeor or the Hodgdon-Beckett circumference equations, the original paper is the reference.
- 02
Implement it as a pure function
The calculation is written in TypeScript in lib/calc/, taking plain numbers and returning plain numbers, with no React and no interface concerns. Special cases that the closed form cannot express — a zero interest rate, a month shorter than the start date — are handled explicitly rather than left to produce a NaN.
- 03
Test against known values and edge cases
Each function is tested against figures that can be verified independently, plus boundary conditions and inverse round-trips. A savings-goal deposit, for example, is fed back through the forward compounding formula and must land on the original target.
- 04
Write the content from the working code
The worked example on each tool page uses figures produced by the same function the tool runs, so the number in the prose and the number in the widget cannot disagree. Automated checks enforce that every FAQ is self-contained, every source uses HTTPS, and every internal link resolves.
- 05
Date it and review it quarterly
The visible review date is the date the formula and its sources were last verified. Where a source is itself revised — a tax rate, a clinical threshold, an RFC superseded by a newer one — the page is updated and the date moves with it.
Rounding, precision and units
- Rounding happens once, at display time
- All intermediate arithmetic is carried at full double precision, and rounding is applied only to the value shown. Rounding at each step compounds error — an amortization schedule rounded to cents every month drifts by several dollars across a 30-year term.
- Conversion factors are exact where a definition exists
- One inch is exactly 25.4 millimetres and one pound is exactly 0.45359237 kilograms by the 1959 international yard and pound agreement. Those conversions carry no approximation. Every unit is stored as a factor to a single base unit, so a conversion is one multiply and one divide with no chained error.
- Dates are computed in UTC
- Calendar arithmetic runs entirely in Coordinated Universal Time. Local-time arithmetic makes two days a year 23 and 25 hours long, and a naive division by 24 hours then produces off-by-one errors across any span containing a daylight-saving transition.
- Randomness comes from the Web Crypto CSPRNG
- Generators draw from crypto.getRandomValues, seeded by operating-system entropy, rather than Math.random — whose internal state can be recovered from a modest number of observed outputs. The first server-rendered paint uses a fixed deterministic seed so that hydration matches; the browser re-draws from the secure source immediately after mount.
The formula behind every tool
Each entry gives the expression the tool evaluates. Follow the link for the variable definitions, the worked example and the specific citations.
Calculators
- Percentage calculator
- result = (X ÷ 100) × Y change = ((Y − X) ÷ |X|) × 100
- Reviewed · Encyclopædia Britannica
- Mortgage calculator
- M = P × [r(1 + r)ⁿ] ÷ [(1 + r)ⁿ − 1]
- Reviewed · US Consumer Financial Protection Bureau
- Loan calculator
- M = P × [r(1 + r)ⁿ] ÷ [(1 + r)ⁿ − 1]
- Reviewed · US Consumer Financial Protection Bureau
- Car payment calculator
- P = price + sales tax − down payment − trade-in; M = P × [r(1 + r)ⁿ] ÷ [(1 + r)ⁿ − 1]
- Reviewed · US Consumer Financial Protection Bureau
- Compound interest calculator
- A = P(1 + r/n)^(nt) + PMT × [((1 + r/n)^(nt) − 1) ÷ (r/n)]
- Reviewed · US Securities and Exchange Commission
- Savings goal calculator
- PMT = (FV − P(1 + r)ⁿ) × r ÷ ((1 + r)ⁿ − 1)
- Reviewed · US Federal Deposit Insurance Corporation
- Tip calculator
- tip = bill × (p ÷ 100); total = bill + tip; share = total ÷ people
- Reviewed · US Department of Labor
- Discount calculator
- sale = price × (1 − d₁ ÷ 100) × (1 − d₂ ÷ 100); saved = price − sale
- Reviewed · US Federal Trade Commission
- Sales tax calculator
- gross = net × (1 + rate ÷ 100); net = gross ÷ (1 + rate ÷ 100)
- Reviewed · Supreme Court of the United States
- BMI calculator
- BMI = weight(kg) ÷ height(m)² BMI = 703 × weight(lb) ÷ height(in)²
- Reviewed · World Health Organization
- Calorie calculator
- BMR = 10w + 6.25h − 5a + k TDEE = BMR × activity factor
- Reviewed · Mifflin et al., American Journal of Clinical Nutrition, 1990
- Body fat calculator
- men: 495 ÷ (1.0324 − 0.19077·log₁₀(waist − neck) + 0.15456·log₁₀(height)) − 450 women: 495 ÷ (1.29579 − 0.35004·log₁₀(waist + hip − neck) + 0.22100·log₁₀(height)) − 450
- Reviewed · Hodgdon and Beckett, Naval Health Research Center, 1984
- Age calculator
- age = whole years elapsed, then whole months, then remaining days
- Reviewed · US National Institute of Standards and Technology
- Date duration calculator
- days = (end − start) ÷ 86,400,000 ms, computed in UTC
- Reviewed · International Organization for Standardization
- Grade calculator
- G = Σ(scoreᵢ × weightᵢ) ÷ Σweightᵢ needed = (target − G × (1 − w)) ÷ w
- Reviewed · US National Center for Education Statistics
- GPA calculator
- GPA = Σ(grade pointsᵢ × creditsᵢ) ÷ Σcreditsᵢ
- Reviewed · US National Center for Education Statistics
Converters
- Length converter
- result = value × (factor_from ÷ factor_to)
- Reviewed · Bureau International des Poids et Mesures
- Weight converter
- result = value × (factor_from ÷ factor_to)
- Reviewed · Bureau International des Poids et Mesures
- Temperature converter
- °F = °C × 9/5 + 32 °C = (°F − 32) × 5/9 K = °C + 273.15
- Reviewed · Bureau International des Poids et Mesures
- Speed converter
- result = value × (factor_from ÷ factor_to)
- Reviewed · Bureau International des Poids et Mesures
- Data storage converter
- decimal: 1 kB = 1000 B binary: 1 KiB = 1024 B result = value × (factor_from ÷ factor_to)
- Reviewed · International Electrotechnical Commission
- Volume converter
- result = value × (factor_from ÷ factor_to)
- Reviewed · US National Institute of Standards and Technology
PDF tools
- Merge PDF
- output pages = Σ pages(fileᵢ) output size = Σ size(fileᵢ) − shared resources
- Reviewed · International Organization for Standardization
- Split PDF
- selection = union of ranges, clamped to 1…n and deduplicated; parts = ⌈n ÷ k⌉
- Reviewed · International Organization for Standardization
- Compress PDF
- pixels per page = (width_pt ÷ 72 × DPI) × (height_pt ÷ 72 × DPI); size = pixels × bytes-per-pixel(quality)
- Reviewed · International Organization for Standardization
- Images to PDF
- scale = min((W − 2m) ÷ w, (H − 2m) ÷ h); x = (W − w·scale) ÷ 2, y = (H − h·scale) ÷ 2
- Reviewed · International Organization for Standardization
Image tools
- Image resizer
- scale = min(maxW ÷ w, maxH ÷ h); w′ = round(w × scale), h′ = round(h × scale)
- Reviewed · WHATWG HTML Standard
- Image compressor
- find the largest quality q between 0.30 and 0.95 for which size(q) fits within target
- Reviewed · Joint Photographic Experts Group
Generators
- QR code generator
- modules = 4 × version + 17, version from 1 to 40
- Reviewed · International Organization for Standardization
- Random number generator
- X = min + ⌊U × (max − min + 1)⌋, U uniform on [0, 1)
- Reviewed · World Wide Web Consortium
Developer tools
- Hash generator
- digest = SHA-n(message); |digest| = n bits = n ÷ 4 hex characters
- Reviewed · US National Institute of Standards and Technology
- Regex tester
- new RegExp(pattern, flags).exec(subject) repeatedly until null
- Reviewed · Ecma International, TC39
Text tools
- Word counter
- words = whitespace-separated tokens reading minutes = words ÷ 238
- Reviewed · Brysbaert, Journal of Memory and Language, 2019
- Case converter
- tokenise on word boundaries → apply the target case rule → rejoin with the target separator
- Reviewed · Unicode Consortium
All references
The 95 sources every calculation on this site is derived from, grouped by publisher.
- PDF 1.7 specification — document structure and object streams
Adobe Systems
Used by: Merge PDF, Split PDF
- Percent body fat norms for men and women
American Council on Exercise
Used by: Body fat calculator
- How many words do we read per minute? A review and meta-analysis of reading rate
Brysbaert, Journal of Memory and Language, 2019
Used by: Word counter
- The International System of Units (SI Brochure)
Bureau International des Poids et Mesures
Used by: Length converter, Weight converter, Speed converter, Data storage converter, Volume converter
- The kelvin — SI base unit definition
Bureau International des Poids et Mesures
Used by: Temperature converter
- Ratios, rates and percentages — mathematical standards
Common Core State Standards Initiative
Used by: Percentage calculator, Discount calculator, Grade calculator
- SHAttered — the first practical SHA-1 collision
CWI Amsterdam and Google Research
Used by: Hash generator
- QR Code capacity, versions and error correction levels
Denso Wave
Used by: QR code generator
- ECMA-404 — The JSON Data Interchange Syntax
Ecma International
Used by: JSON formatter
- ECMAScript specification — RegExp objects
Ecma International, TC39
Used by: Regex tester
- Percentage — definition and worked methods
Encyclopædia Britannica
Used by: Percentage calculator
- Weighted mean — definition and method
Encyclopædia Britannica
Used by: Grade calculator, GPA calculator
- VAT rates applied in EU member states
European Commission
Used by: Sales tax calculator
- Sales tax on discounted goods and coupons
Federation of Tax Administrators
Used by: Discount calculator
- State sales tax rate tables
Federation of Tax Administrators
Used by: Sales tax calculator
- Primary Mortgage Market Survey — historical rates
Freddie Mac
Used by: Mortgage calculator
- WebP compression techniques and comparison
Google
Used by: Image compressor, Image converter
- Serve images in modern formats and correct sizes
Google web.dev
Used by: Image resizer
- Optimize images to improve Largest Contentful Paint
Google web.dev
Used by: Image compressor
- Prediction of percent body fat for U.S. Navy men and women from body circumferences and height
Hodgdon and Beckett, Naval Health Research Center, 1984
Used by: Body fat calculator
- RFC 9562 — Universally Unique IDentifiers (UUIDs)
IETF
Used by: UUID generator
- RFC 8259 — The JavaScript Object Notation (JSON) Data Interchange Format
IETF
Used by: JSON formatter
- RFC 4648 — The Base16, Base32, and Base64 Data Encodings
IETF
Used by: Base64 encoder
- RFC 2045 — MIME Part One, including Base64 content transfer encoding
IETF
Used by: Base64 encoder
- RFC 7519 — JSON Web Token
IETF
Used by: Base64 encoder
- RFC 3986 — Uniform Resource Identifier (URI): Generic Syntax
IETF
Used by: URL encoder
- IEC 80000-13 — binary prefixes for information quantities
International Electrotechnical Commission
Used by: Data storage converter
- ISO 8601 — date and time representation
International Organization for Standardization
Used by: Age calculator, Date duration calculator
- ISO 32000-2 — Portable Document Format
International Organization for Standardization
Used by: Merge PDF, Split PDF, Compress PDF, Images to PDF
- ISO 216 — A-series paper sizes
International Organization for Standardization
Used by: Images to PDF
- ISO/IEC 18004 — QR Code bar code symbology specification
International Organization for Standardization
Used by: QR code generator
- JPEG (ISO/IEC 10918) — image compression standard
Joint Photographic Experts Group
Used by: Compress PDF, Image compressor, Image converter
- A new predictive equation for resting energy expenditure in healthy individuals
Mifflin et al., American Journal of Clinical Nutrition, 1990
Used by: Calorie calculator
- pdf.js — PDF rendering in the browser
Mozilla
Used by: Compress PDF
- createImageBitmap and EXIF orientation handling
Mozilla Developer Network
Used by: Image resizer
- IEEE 754 double-precision and safe integers
Mozilla Developer Network
Used by: JSON formatter
- Regular expressions — syntax reference
Mozilla Developer Network
Used by: Regex tester
- Standard Atmosphere and the speed of sound
NASA Glenn Research Center
Used by: Speed converter
- Password Storage Cheat Sheet
OWASP
Used by: Hash generator
- Regular expression Denial of Service (ReDoS)
OWASP
Used by: Regex tester
- pdf-lib — client-side PDF creation and modification
pdf-lib project
Used by: Merge PDF, Split PDF, Images to PDF
- South Dakota v. Wayfair, Inc., 585 U.S. 162 (2018)
Supreme Court of the United States
Used by: Sales tax calculator
- Capitalization in titles and headings
The Chicago Manual of Style
Used by: Case converter
- Password guidance — simplifying your approach
UK National Cyber Security Centre
Used by: Password generator
- Percentage change and percentage point guidance
UK Office for National Statistics
Used by: Percentage calculator
- Unicode Standard Annex 29 — text segmentation
Unicode Consortium
Used by: Word counter
- Unicode Standard Annex 21 — case mappings
Unicode Consortium
Used by: Case converter
- About Adult BMI
US Centers for Disease Control and Prevention
Used by: BMI calculator
- Understanding loan estimates and mortgage costs
US Consumer Financial Protection Bureau
Used by: Mortgage calculator
- Regulation Z — Truth in Lending disclosures
US Consumer Financial Protection Bureau
Used by: Loan calculator
- What is an APR?
US Consumer Financial Protection Bureau
Used by: Loan calculator
- Auto loans — shopping and comparison guidance
US Consumer Financial Protection Bureau
Used by: Car payment calculator
- Regulation DD — Truth in Savings and APY
US Consumer Financial Protection Bureau
Used by: Compound interest calculator
- Saving for emergencies
US Consumer Financial Protection Bureau
Used by: Savings goal calculator
- Credit hour — federal definition
US Department of Education
Used by: GPA calculator
- Tipped employees — federal wage requirements
US Department of Labor
Used by: Tip calculator
- Service charges versus tips
US Department of Labor
Used by: Tip calculator
- Dietary Guidelines for Americans — estimated calorie needs
US Departments of Agriculture and Health and Human Services
Used by: Calorie calculator
- Deposit insurance coverage limits
US Federal Deposit Insurance Corporation
Used by: Savings goal calculator
- Homeowners Protection Act — PMI cancellation rules
US Federal Reserve
Used by: Mortgage calculator
- Consumer credit statistics — G.19 release
US Federal Reserve
Used by: Loan calculator, Car payment calculator
- Understanding vehicle financing
US Federal Trade Commission
Used by: Car payment calculator
- Guides against deceptive pricing
US Federal Trade Commission
Used by: Discount calculator
- Reference amounts and serving sizes on food labels
US Food and Drug Administration
Used by: Volume converter
- Tip income reporting requirements
US Internal Revenue Service
Used by: Tip calculator
- Grading and academic standing policies — reference practice
US National Center for Education Statistics
Used by: Grade calculator
- Postsecondary grading and credit-hour reporting
US National Center for Education Statistics
Used by: GPA calculator
- Body composition measurement methods
US National Institute of Diabetes and Digestive and Kidney Diseases
Used by: Body fat calculator
- Leap years and the Gregorian calendar
US National Institute of Standards and Technology
Used by: Age calculator
- Coordinated Universal Time and civil timekeeping
US National Institute of Standards and Technology
Used by: Date duration calculator
- International yard and pound agreement of 1959
US National Institute of Standards and Technology
Used by: Length converter
- NIST Guide to the SI — conversion factors
US National Institute of Standards and Technology
Used by: Length converter, Speed converter
- Redefining the kilogram
US National Institute of Standards and Technology
Used by: Weight converter
- NIST Handbook 44 — weights and measures
US National Institute of Standards and Technology
Used by: Weight converter, Volume converter
- ITS-90 international temperature scale
US National Institute of Standards and Technology
Used by: Temperature converter
- Redefining the kelvin
US National Institute of Standards and Technology
Used by: Temperature converter
- Prefixes for binary multiples
US National Institute of Standards and Technology
Used by: Data storage converter
- NIST SP 800-63B — Digital Identity Guidelines, Authentication
US National Institute of Standards and Technology
Used by: Password generator
- NIST SP 800-90A — random bit generation
US National Institute of Standards and Technology
Used by: Random number generator, UUID generator
- A statistical test suite for random number generators
US National Institute of Standards and Technology
Used by: Random number generator
- FIPS 180-4 — Secure Hash Standard
US National Institute of Standards and Technology
Used by: Hash generator
- Leap seconds and calendar timekeeping
US Naval Observatory
Used by: Age calculator
- Federal holidays
US Office of Personnel Management
Used by: Date duration calculator
- Plain language guidelines — sentence and paragraph length
US Plain Language Action and Information Network
Used by: Word counter, Case converter
- Compound interest — investor education and calculator
US Securities and Exchange Commission
Used by: Compound interest calculator, Savings goal calculator
- Saving and investing — a roadmap
US Securities and Exchange Commission
Used by: Compound interest calculator
- URL Standard — parsing and percent-encoding
WHATWG
Used by: URL encoder
- Canvas 2D — drawImage and image smoothing
WHATWG HTML Standard
Used by: Image resizer
- application/x-www-form-urlencoded serialisation
WHATWG HTML Standard
Used by: URL encoder
- Appropriate body-mass index for Asian populations
WHO Expert Consultation, The Lancet
Used by: BMI calculator
- Obesity and overweight — BMI classification
World Health Organization
Used by: BMI calculator
- Healthy diet — energy intake fact sheet
World Health Organization
Used by: Calorie calculator
- PNG (Portable Network Graphics) specification
World Wide Web Consortium
Used by: Image converter
- Web Crypto API — getRandomValues specification
World Wide Web Consortium
Used by: Password generator, Random number generator, UUID generator
- Barcode Contents — payload formats for scanners
ZXing project
Used by: QR code generator
Last reviewed: