Golden Ratio Calculator

Calculate golden ratio proportions for free — enter a total, a longer side or a shorter side and get the matching values (φ ≈ 1.618) for layouts, grids, logos and crops, with a golden rectangle and spiral diagram. The typography section turns your body font size into an ideal line height, line width and a golden type scale with copy-ready CSS.

100% private — everything runs in your browser. Conversion happens on your device; nothing is uploaded.

100% private — runs in your browser

Golden ratio typography

φ (phi) ≈ 1.6180339887. Click any result to copy it. The typography section follows the golden-ratio typography method: line height = font size × φ, adjusted for line width, and a type scale in half-steps of φ.

How to use the golden ratio

  1. Enter a known value — the total, the longer side or the shorter side.
  2. Read the matching golden-ratio values (click to copy).
  3. Use the spiral diagram for composition.
  4. Set your body font size to get golden typography and CSS.

What you can use it for

  • Split page layouts into golden columns (e.g. content + sidebar)
  • Size logos, cards and image crops pleasingly
  • Build a harmonious type scale
  • Plan photo compositions with the golden spiral

More free tools

Building for the web?

Format, minify, convert and generate code with our free, private developer tools.

See all free tools →

Frequently asked questions

What is the golden ratio?

About 1.618 (φ). Two quantities are in the golden ratio when the larger divided by the smaller equals the whole divided by the larger.

How do I split a 960 px layout?

Enter 960 as the total: the main column is about 593 px and the sidebar about 367 px.

How is the line height calculated?

With golden-ratio typography: line height ≈ font size × 1.618, adjusted slightly for your line width. For 16 px text that's about 26 px.

Is the golden ratio always best?

It's a useful starting point, not a rule. Use it alongside your content and brand needs.

How do I find the golden ratio of a number?

Type the number into Known value and choose whether it is the total (a + b), the longer side (a) or the shorter side (b). For a total, the longer part is the total ÷ φ and the shorter part is what's left. For a longer side, the shorter side is a ÷ φ; for a shorter side, the longer side is b × φ. So a longer side of 100 gives 61.8 and a total of 161.8.

What do the five results mean?

Longer side (a) and Shorter side (b) are the two golden parts, and Total (a + b) is their sum. Next larger (a × φ) and Next smaller (b ÷ φ) carry the sequence one step further each way, which helps when you need a set of related sizes, such as section, card and icon. With 960 as the total, the results are 593.31, 366.69, 960, 960 and 226.63.

Which units can I use?

Choose px, mm, cm, in or pt. The golden ratio has no units, so the unit only labels the results: 960 px and 960 mm split into the same numbers, 593.31 and 366.69. Nothing is converted between units, so enter the value in the unit you want back. The same maths works for widths, heights, margins or any other length.

How precise are the results?

The calculator uses the full-precision value of φ, worked out as (1 + √5) ÷ 2, which is about 1.6180339887. Results are shown rounded to two decimal places. Click any result to copy just the number, without the unit, ready to paste where you need it. Round further to whole pixels if your layout needs them.

What is the ideal line width?

Without a content width, the tool suggests an ideal line width of (font size × φ)², so 16 px text gets about 670 px. If your content column has a fixed width, enter it under Content width and the line height is adjusted for it: slightly tighter for narrower columns and looser for wider ones. For 16 px text, 600 px gives a line height of 25.37 px and 800 px gives 26.85 px.

What type scale does it make?

It builds seven sizes from your body font size, stepping up and down in half-steps of φ, so each size is about 1.272 times the one before. For 16 px body text the scale is 9.9, 12.6, 16, 20.4, 25.9, 32.9 and 41.9 px, previewed as “Aa” samples. Use the larger steps for headings and the smaller ones for captions and labels.

How do I use the CSS?

Click Copy CSS and paste the :root block into your stylesheet. It defines –step-n2 to –step-4 for the type scale in rem, plus –line-height as a unitless number and –measure as the line width in px. Then use them in your rules, for example font-size: var(–step-2) on a heading or max-width: var(–measure) on body text. The rem values assume a 16 px root size.

What does the spiral diagram show?

It shows a golden rectangle divided into eight squares, each smaller than the last by a factor of about φ, with a quarter-circle arc in each square forming the spiral. Because the ratio is the same at every size, the diagram keeps the same shape whatever value you enter. To download a spiral as a PDF, PNG or SVG, or lay it over a photo, use our Golden Spiral tool.