Golden Ratio Layout Grid Configurator
Natural Scaling Dimensions for Designers
Enter a base dimension and instantly get phi-proportioned column widths, typography scales, CSS grid code, and a live wireframe preview. Everything calculated client-side.
The Complete Guide to Golden Ratio Layout Design
The Golden Ratio is one of the most debated but enduring tools in the designer's toolkit. This guide explains the math, the practical CSS, and when to use phi-based proportions versus simpler alternatives.
How to Use This Configurator
Type any dimension into the Base Dimension field - this might be your total container width, your target column width, or your body font size. Select a unit (px, rem, em, or vw) and choose a Layout Model. The math breakdown, wireframe, and CSS code all update in real time as you type. No submit button is needed.
For a classic editorial two-column layout, type your total content width (e.g., 1200) and choose Two-Column. For a content-plus-sidebar pattern, the Major column is your main content and the Minor is your sidebar. For typography, enter your body font size (typically 16) and read the h1 through caption scale directly.
The Math Behind Phi
Phi (1.6180339887...) is an irrational number, meaning its decimal expansion never repeats. It satisfies the unique equation: phi squared equals phi plus 1. This recursive self-similarity is why phi appears in natural growth patterns, from nautilus shells to sunflower seed spirals.
For design, the key formulas are straightforward. Given a total width T, the Major segment A = T / phi and the Minor segment B = T - A. This means B is approximately 38.2% and A is approximately 61.8% of T. These percentages come directly from 1/phi (0.618) and 1/phi^2 (0.382).
Choosing Between fr Units and Exact Pixels
When your layout has a flexible container, use grid-template-columns: 1fr 1.618fr. This tells CSS Grid to give one column 1 fractional unit and the other 1.618 fractional units, producing a perfect phi ratio at any container size. This is almost always the right choice for responsive design.
Use exact pixel values when you need one column to remain fixed regardless of screen size - for example, a 300px sidebar next to a flexible main area. In that case calculate the major column width from your expected container size and hard-code it. The CSS this tool generates covers both approaches.
Applying Phi to Typography
A phi-based modular scale takes a single base size and multiplies or divides it repeatedly by 1.618 to generate the full type hierarchy. Starting from 16px: caption is 16 / 1.618 = 9.9px, body stays at 16px, h3 = 16 x 1.618 = 25.9px, h2 = 41.9px, h1 = 67.8px. Each step has a harmonic relationship to every other, so the hierarchy feels coherent without needing manual adjustment.
Golden Rectangle and the Spiral
The Golden Rectangle tool takes any width and returns the height that creates a phi-proportioned rectangle. The unique self-similar property - that removing a square from a golden rectangle leaves another golden rectangle - is what generates the famous logarithmic spiral. Hero images, cards, and modal windows sized as golden rectangles tend to feel naturally balanced.
FAQ
grid-template-columns: 1fr 1.618fr creates a perfect golden ratio split that scales with the container. Use exact pixel values only when you need a fixed-width sidebar or when working within a known container size. Mixing fr and px (e.g., 300px 1fr) gives you one fixed column and one flexible column.