Alpha Compositing Calculator
Composite a foreground over a background with an explicit encoded or linear-light sRGB convention.
Open toolBuild a finite type scale and copy CSS custom properties for the computed pixel sizes. Provide Base font size (px), Scale ratio, Steps below base to compute results directly in your browser. Size at step i = base × ratio^i. Steps below and above the base are bounded to 20 each. CSS variable names use minusN for negative steps; this is a size scale, not a font loading or accessibility check. Numeric output uses up to 12 significant digits; floating-point rounding can occur. Common search workflows supported include "font scale", "font size calculator", "font calc".
Enter the inputs, then select Calculate.
Result will appear here
The Typographic Scale Calculator evaluates Base font size (px), Scale ratio, Steps below base in client-side JavaScript using the deterministic rule below and updates the output panel immediately without uploading data to a server.
Build a finite type scale and copy CSS custom properties for the computed pixel sizes.
Size at step i = base × ratio^i. Steps below and above the base are bounded to 20 each. CSS variable names use minusN for negative steps; this is a size scale, not a font loading or accessibility check. Numeric output uses up to 12 significant digits; floating-point rounding can occur.
Review the input parameters, allowed value ranges, and worked reference cases for the Typographic Scale Calculator below before running your calculation.
| Parameter / Scenario | Default / Sample Value | Rule or Allowed Range | Output / Usage Note |
|---|---|---|---|
| Input: Base font size (px) | 16 | Range: 0.1 to 1000 | Required workspace parameter |
| Input: Scale ratio | 1.25 | Range: 0.1 to 10 | Required workspace parameter |
| Input: Steps below base | 2 | Range: 0 to 20 | Required workspace parameter |
| Input: Steps above base | 3 | Range: 0 to 20 | Required workspace parameter |
| Worked Case 1: Baseline run (Base font size (px) = 16) | Preloaded / test values | Build a finite type scale and copy CSS custom properties for the computed pixel sizes | Base font size (px) = 16; Scale ratio = 1.25; Steps below base = 2; Steps above base = 3. Output excerpt: Scale (px): -2: 10.24; -1: 12.8; 0: 16; 1: 20; 2: 25; 3: 31.25; CSS variables: --font-size-minus2: 10.24px;; --font-size-minus1: 12.8px;; --font-size-0: 16px;. |
| Worked Case 2: Comparison scenario (Modular Scale Generator) | Preloaded / test values | Build a finite type scale and copy CSS custom properties for the computed pixel sizes | Base font size (px) = 20; Scale ratio = 2; Steps below base = 1; Steps above base = 2. Output excerpt: Scale (px): -1: 10; 0: 20; 1: 40; 2: 80; CSS variables: --font-size-minus1: 10px;; --font-size-0: 20px;; --font-size-1: 40px;. |
Follow these three steps to configure Base font size (px), Scale ratio, Steps below base, verify unit and boundary rules, and export your Typographic Scale Calculator output.
Size at step i = base × ratio^i. Steps below and above the base are bounded to 20 each. CSS variable names use minusN for negative steps; this is a size scale, not a font loading or accessibility check. Numeric output uses up to 12 significant digits; floating-point rounding can occur.
Select Calculate, check the labelled result, then use Copy result or Download result.txt.
These concrete scenarios illustrate how the Typographic Scale Calculator processes baseline inputs, comparison checks, and boundary constraints.
Base font size (px) = 16; Scale ratio = 1.25; Steps below base = 2; Steps above base = 3. Output excerpt: Scale (px): -2: 10.24; -1: 12.8; 0: 16; 1: 20; 2: 25; 3: 31.25; CSS variables: --font-size-minus2: 10.24px;; --font-size-minus1: 12.8px;; --font-size-0: 16px;.
Base font size (px) = 20; Scale ratio = 2; Steps below base = 1; Steps above base = 2. Output excerpt: Scale (px): -1: 10; 0: 20; 1: 40; 2: 80; CSS variables: --font-size-minus1: 10px;; --font-size-0: 20px;; --font-size-1: 40px;.
When solving for 'font scale', verify that Base font size (px), Scale ratio, Steps below base use consistent units and stay within the documented scope: Size at step i = base × ratio^i. Steps below and above the base are bounded to 20 each. CSS variable names use minusN for negative steps; this is a size scale, not a font loading or accessibility check. Numeric output uses up to 12 significant digits; floating-point rounding can occur.
The output panel reports the exact result derived from Base font size (px), Scale ratio, Steps below base alongside any unit or formatting notes.
Every calculation follows the rule: Build a finite type scale and copy CSS custom properties for the computed pixel sizes. Because JavaScript uses IEEE 754 double-precision floating-point arithmetic, numeric outputs display up to 12 significant digits where applicable.
Always cross-check the displayed result against the scope note (Size at step i = base × ratio^i. Steps below and above the base are bounded to 20 each. CSS variable names use minusN for negative steps; this is a size scale, not a font loading or accessibility check. Numeric output uses up to 12 significant digits; floating-point rounding can occur) before applying the value to production specifications, financial models, or lab records.
Review these boundary constraints and validation rules before relying on the Typographic Scale Calculator output.
Operational scope: Size at step i = base × ratio^i. Steps below and above the base are bounded to 20 each. CSS variable names use minusN for negative steps; this is a size scale, not a font loading or accessibility check. Numeric output uses up to 12 significant digits; floating-point rounding can occur. Inputs that violate minimum/maximum bounds or required format rules are rejected with a clear diagnostic prompt.
Need an adjacent calculation in Everyday Math? Use the related tools linked below to chain your workflow without leaving your browser.
Composite a foreground over a background with an explicit encoded or linear-light sRGB convention.
Open toolList baseline positions from the top margin and show space remaining below the final line.
Open tool
Copy the selected integer-pixel rectangle into a new PNG.
Open toolChoose another tool for your next calculation, conversion, or text task.

Generate cross-browser CSS gradient text code with linear-gradient or radial-gradient, background-clip: text, -webkit-text-fill-color, and fallback color.
Open tool
Generate CSS text-shadow code with horizontal/vertical px offsets, blur radius, RGBA color conversion, and multi-layer neon or 3D extrusion presets.
Open tool
Read the RGBA values at one integer-pixel position and print hex and CSS forms.
Open toolCreate a silent 16-bit PCM WAV with your chosen duration, sample rate and channel count.
Open toolAnswers about using Typographic Scale Calculator and understanding its results.
The Typographic Scale Calculator applies the rule: Build a finite type scale and copy CSS custom properties for the computed pixel sizes. Enter Base font size (px), Scale ratio, Steps below base into the workspace and the tool computes the exact output in your browser.
Yes. Provide Base font size (px), Scale ratio, Steps below base using the documented units and format shown in the quick reference table above. Preloaded default values let you test the workflow immediately.
Size at step i = base × ratio^i. Steps below and above the base are bounded to 20 each. CSS variable names use minusN for negative steps; this is a size scale, not a font loading or accessibility check. Numeric output uses up to 12 significant digits; floating-point rounding can occur. Confirm that your inputs fall within the allowed ranges before exporting the result.
Yes. All calculations for the Typographic Scale Calculator execute 100% locally in your browser's JavaScript runtime. No inputs or results are uploaded to any external server.
Choose another tool for your next calculation, conversion, or text task.