📐

Typography Scale Calculator

Generate harmonious modular type scales with mathematical precision

Typically 16px for body text

Generated Scale Preview

💡 Quick Guide: Smaller ratios (1.2-1.25) create subtle differences, larger ratios (1.5-1.618) create dramatic contrast. Choose based on your design style.

Complete Typography Scale Calculator Guide

The Typography Scale Calculator is a professional design tool that generates mathematically harmonious font size systems for websites, apps, and digital products. Instead of selecting arbitrary font sizes that feel random and disconnected, modular scales use consistent mathematical ratios to create proportional, balanced typography hierarchies. Choose your base size (typically 16px for body text) and a ratio (like golden ratio, perfect fourth, or major third), and the calculator instantly generates your complete type scale with ready-to-use CSS variables.

What is a Modular Typography Scale?

A modular scale is a sequence of numbers that relate to each other through a common ratio—the same mathematical principle behind musical scales, architectural proportions, and patterns found in nature. In typography, you select a base font size and multiply it by a ratio repeatedly to generate larger sizes, or divide to generate smaller sizes. For example, with a 16px base and 1.25 ratio (major third): 10.24px → 12.8px → 16px → 20px → 25px → 31.25px → 39px → 49px → 61px. Each size has a proportional mathematical relationship to every other size, creating inherent visual harmony that arbitrary sizes (like 14px, 19px, 26px, 34px) cannot achieve.

Understanding Scale Ratios

Scale ratios determine how dramatically your font sizes increase. Each ratio creates a different visual rhythm and hierarchy: Minor Second (1.067): Very subtle progression. Creates tight, minimal spacing between sizes. Best for interfaces with limited vertical space or when you need many similar sizes close together. Major Second (1.125): Gentle progression. Good for content-dense applications and dashboards where extreme size contrast isn't needed. Minor Third (1.2): Balanced, versatile progression. The most commonly used ratio—works well for most websites and applications. Creates clear hierarchy without extreme jumps. Major Third (1.25): Slightly stronger progression. Popular for blogs, documentation, and content sites. Provides good differentiation between heading levels. Perfect Fourth (1.333): Clear, noticeable progression. Creates strong visual hierarchy perfect for marketing sites and editorial layouts where headings must stand out dramatically. Perfect Fifth (1.5): Bold, dramatic progression. Creates significant size differences for high-impact designs and artistic sites. Golden Ratio (1.618): Maximum elegance and drama. Based on phi (φ), the mathematical constant found throughout nature. Creates sophisticated, luxurious progressions but can feel extreme for utilitarian content.

How to Use the Typography Scale Calculator

Step 1: Set your base font size—typically 16px for standard body text, though 14px works for dense interfaces and 18px for reading-focused sites. Step 2: Choose a scale ratio that matches your design intent—subtle for minimal designs, dramatic for bold statements. Step 3: Preview the generated sizes with sample text to see how the progression looks in practice. Step 4: Review the nine generated sizes: xs (smallest), sm, base (your starting size), lg, xl, 2xl, 3xl, 4xl, 5xl (largest). Step 5: Copy the CSS variables code which includes :root declarations and usage examples. Step 6: Paste into your stylesheet and apply sizes using var(--font-size-xl) for headings, var(--font-size-base) for body, etc. Step 7: Adjust your base size or ratio if needed and regenerate—the calculator updates instantly.

CSS Variables Implementation

The calculator generates CSS custom properties (variables) that make your typography system maintainable and consistent. Instead of hardcoding font sizes throughout your CSS, you define sizes once in :root and reference them with var() notation. This approach provides significant benefits: Single Source of Truth: Change the base size or ratio in one place and all elements update automatically. Consistency: Designers and developers reference the same predefined sizes. Maintainability: Easier to adjust typography system-wide without finding every font-size declaration. Scalability: Add new components using existing scale sizes. Documentation: Variable names communicate size purpose clearly. The generated code includes both variable declarations and practical usage examples for h1-h6 and body elements.

Choosing the Right Base Size

Your base size determines the foundation of your entire type scale. Consider these factors: 16px (Standard): Browser default, optimal for general web content, proven for readability across devices. Recommended for most websites. 14px (Dense): Allows more content in limited space. Used by applications, admin panels, and data-heavy interfaces. May reduce readability for older audiences. 18px (Reader-Friendly): Larger base improves readability, especially for long-form content, blogs, and news sites. Better for older demographics. 12-15px (Small Screens): Sometimes used for mobile-first designs, though 16px usually scales better. Custom Sizes: Some brands use unique base sizes (17px, 15px) for differentiation. Test base sizes with your actual content and target devices before committing.

Practical Application Examples

How to apply your modular scale to real design elements: H1 (Hero Headings): Use 5xl or 4xl for main page titles and hero sections. H2 (Section Headings): Use 3xl or 2xl for major section dividers. H3 (Subsections): Use xl or lg for subsection headings within content. H4-H6 (Minor Headings): Use lg, base, or sm for nested headings. Body Text: Use base size for main content—this is your 16px starting point. Small Text: Use sm or xs for captions, footnotes, metadata, and disclaimers. Buttons: Use base or lg for readable, appropriately-sized button text. Navigation: Use sm or base depending on menu style and available space. The scale gives you 9 options to choose from, covering every typical design need.

Responsive Typography Strategies

Modular scales can adapt to different screen sizes using responsive techniques: Single Scale: Use the same scale across all devices—sizes scale naturally as viewport changes. Simplest approach. Ratio Switching: Use smaller ratio (1.2) on mobile, larger ratio (1.5) on desktop for more dramatic heading contrast on large screens. Base Size Adjustment: Keep ratio constant but adjust base size: 14px mobile, 16px desktop, 18px large screens. Clamped Sizes: Use CSS clamp() to set minimum, preferred, and maximum sizes that scale smoothly: font-size: clamp(1rem, 2vw, 3rem). Breakpoint-Specific: Generate separate scales for mobile, tablet, and desktop breakpoints. Test your chosen strategy on real devices to ensure readability and appropriate hierarchy at all screen sizes.

Perfect For:

  • Web Designers: Create consistent, professional typography systems for websites and applications
  • Front-End Developers: Generate CSS variables for design systems and component libraries
  • UI/UX Designers: Establish clear visual hierarchy with mathematically balanced sizes
  • Brand Designers: Develop typography guidelines and brand style guides
  • Product Designers: Create scalable typography for digital products
  • Content Creators: Improve readability and visual appeal with proper sizing
  • Design System Architects: Build foundational typography tokens for large projects

Historical Context: Musical Scales

Modular scales in typography derive from musical scale theory. Just as musical notes relate through mathematical intervals (octaves, fifths, fourths), typographic sizes can relate through the same ratios. The "Perfect Fourth" ratio (1.333) corresponds to the musical interval between C and F. The "Perfect Fifth" (1.5) matches C to G. These ratios have pleased human perception for millennia in music, and they create the same satisfying harmony in visual design. Renaissance typographers understood these connections, and digital designers continue applying these timeless principles.

Common Typography Scale Mistakes

Random Sizes: Picking arbitrary sizes like 13px, 19px, 27px creates visual discord. Too Many Sizes: Using 15+ different font sizes when 6-8 would suffice creates inconsistency. Ignoring Scale: Adding "just one more size" between existing scale steps breaks the mathematical harmony. Wrong Ratio: Using golden ratio (1.618) for content-heavy sites creates unusably large headings. Inconsistent Application: Defining a scale but not using it consistently throughout the design. No Variables: Hardcoding sizes instead of using CSS variables makes changes difficult. Skipping Preview: Not testing the scale with real content before implementation. The calculator helps avoid these mistakes by generating proven, proportional scales.

Integration with Design Systems

Modern design systems rely heavily on typography scales for consistency: Token-Based Design: Scale sizes become design tokens referenced across components. Component Libraries: All components use scale sizes, ensuring consistency. Documentation: Typography scale is documented as a core design principle. Collaboration: Designers and developers share the same size vocabulary. Theming: Different themes can use different base sizes while maintaining scale ratios. The calculator generates scale formats compatible with popular design systems like Material Design, Tailwind, Bootstrap, and custom frameworks. Export as CSS variables, SCSS variables, or JSON for design tokens.

Advanced Techniques

Dual Scales: Use one scale for headings (larger ratio like 1.5) and another for body text variations (smaller ratio like 1.125). Optical Adjustments: After generating mathematical sizes, adjust specific sizes slightly for optical balance—math provides a starting point, visual judgment refines it. Line Height Scaling: Apply the same ratio to line heights for proportional vertical rhythm. Spacing Scale: Use your typography scale to generate margin and padding values for vertical rhythm. Custom Ratios: While the tool provides common ratios, you can manually test custom values like 1.3, 1.4, etc. for unique brands.

Why Use This Typography Calculator

Mathematical Precision: Generates exact proportional sizes based on proven ratios. Instant Preview: See how the scale looks with sample text at all sizes. Nine Size Steps: Covers all typical design needs from captions to display headings. Ready-to-Use CSS: Copy-paste CSS variables code directly into projects. Usage Examples: Includes example code showing how to apply sizes to HTML elements. Multiple Ratios: Eight common scale ratios from subtle to dramatic. Flexible Base: Adjust base size from 8px to 32px for any project type. 100% Free: No account, payment, or usage restrictions. Educational: Learn typography principles through practical application.

Start creating harmonious typography scales now. Whether building design systems, developing websites, or learning typography principles, our calculator delivers mathematically perfect, professionally balanced font size hierarchies instantly.

Frequently Asked Questions

What is a typography scale? +

A typography scale is a set of harmonious font sizes based on a mathematical ratio. Instead of arbitrary sizes like 14px, 18px, 24px, you multiply a base size by a consistent ratio to create proportional, balanced heading and text sizes. This creates visual harmony similar to musical scales.

What is the golden ratio for typography? +

The golden ratio (1.618) creates elegant, naturally balanced type scales used in design for centuries. With a 16px base, sizes become: 10px, 16px, 26px, 42px, 68px, 110px. This ratio appears in nature, architecture, and art, producing aesthetically pleasing proportions.

Which modular scale ratio should I use? +

Minor Third (1.2) for subtle, tight spacing suitable for content-heavy sites. Major Third (1.25) for balanced, versatile designs—the most popular choice. Perfect Fourth (1.333) for clear hierarchy in blogs and articles. Perfect Fifth (1.5) for strong contrast in marketing sites. Golden Ratio (1.618) for maximum elegance and dramatic scale in artistic or minimal designs.

How do I use the generated scale in CSS? +

Copy the generated CSS variables code and paste it into your stylesheet's :root selector. Then apply sizes to elements using var(--font-size-xl), var(--font-size-base), etc. The calculator provides complete example code showing how to apply sizes to headings and body text.

Why use modular scales instead of arbitrary font sizes? +

Modular scales create mathematical harmony and consistency. Arbitrary sizes often result in awkward proportions and unclear hierarchy. Modular scales ensure all font sizes relate proportionally, creating professional, cohesive typography that feels intentional rather than random.

What base font size should I use? +

16px is the standard base size for body text, matching browser defaults and providing good readability. Some designers use 14px for content-dense interfaces or 18px for reading-focused sites. Choose based on your content type and target audience age/preferences.

Can I use different scales for mobile vs desktop? +

Yes, responsive typography often uses smaller ratios on mobile (e.g., 1.2) and larger ratios on desktop (e.g., 1.333 or 1.5) to account for screen size differences. You can generate two scales and apply them using CSS media queries.

How many sizes should my scale include? +

The calculator generates 9 sizes (xs, sm, base, lg, xl, 2xl, 3xl, 4xl, 5xl) which covers most design needs: small text, body copy, subheadings, headings, and display text. You don't need to use all sizes—select the ones your design requires.