Musical Typography Scale. Modular Scale Calculator

Free online tool to create harmonious visual hierarchies using modular scales based on musical proportions. Generates ready-to-use CSS variables for your web design.

Configuration

px

Your paragraph text size (usually 16px).

Determines how much the size grows at each step.

Calculated Values

Preview

Variables copied to clipboard!

Utilities Studio

Want this utility on your website?

Customize colors and dark mode for WordPress, Notion or your own site.

Frequently Asked Questions

What is a typographic modular scale?

It is a method for determining font sizes based on a constant mathematical ratio. Just like in music, where notes have harmonic relationships, the modular scale creates a balanced and predictable visual hierarchy.

Why use musical intervals for design?

Musical intervals are proportions that the human brain perceives as harmonious. Applying them to text sizes creates a visual structure that feels correct and professional, rather than choosing sizes at random.

What is the Golden Ratio in typography?

It is the proportion 1.618, known as the Golden Section. It creates very dramatic and elegant scales where each step in the hierarchy grows exponentially. Perfect for portfolio or art-focused websites.

How do I implement the scale in my CSS file?

The tool generates CSS variables (tokens) in :root { --step-N: Xrem; } format. Copy them into your main CSS file and use them with var(--step-N) to maintain typographic consistency across your site.

# The invisible harmony of web design

The Musical Typography Scale applies the mathematics of musical intervals to typographic design. Just as a musical composition is governed by precise proportions, a solid visual design benefits from a mathematical structure that relates all sizes to each other.

# How the modular scale works

The formula

The progression is simple: Size = Base × Ration. Step 0 is your base text. Step 1 is a small subtitle. Step 4 or 5 could be your main H1. The same multiplying constant (the ratio) ensures all relationships are consistent.

Why "Musical"

The Pythagoreans discovered that dividing a string in simple proportions (1:2, 2:3, 3:4) produced consonant sounds. These intervals, octave, perfect fifth and perfect fourth, are exactly the typographic ratios. You are composing visual music.

# Choosing the right ratio

For dense interfaces (dashboards, tables) use small ratios like 1.125 or 1.2. For editorial or portfolio sites, use more expressive ratios like 1.5 or 1.618.
Don't limit the scale to font-size only. The same CSS variables work for margin, padding and gap. When whitespace follows the same mathematical progression as the text, the design achieves a level of cohesion that everyone feels but few can explain.

Bibliographic References