Calculators
Golden ratio calculator for lengths and pixel layouts
This golden ratio calculator splits a length by φ, about 1.618. Enter the whole, the longer part a or the shorter part b, and it returns the other two values to 12 significant digits. With pixels as the unit, it also gives a rounded layout in whole pixels. It runs in your browser.
Your measurement
Choose what you know and enter a value.
Loading calculator…
The exact relationship
φ = (1 + √5) / 2
(a + b) / a = a / b = φ
φ ≈ 1.61803398875. Finite decimal values are approximations.
Your golden ratio
Select Calculate to find the whole and its two parts.
Decimal estimates · 12 significant digits
- Whole (a + b)
- Longer part (a)
- Shorter part (b)
Diagrams show ideal proportions at screen scale, not actual-size measurements.
Rounded pixel layout
Select result text
How to use the golden ratio calculator
Pick the length you already know, type it, then calculate. Any change to an input clears the old result, so what you see always matches the current settings.
- Under Known length, choose Whole (a + b), Longer part (a) or Shorter part (b).
- Type a positive number in Value. Use a decimal point or exponent notation, such as 1.5 or 1e3. Commas and unit letters in the value are rejected.
- Choose a Unit: Pixels (px), Millimeters (mm), Centimeters (cm), Inches (in) or No specific unit. The unit labels the answer; it does not convert the number.
- Select Calculate. The result lists Whole (a + b), Longer part (a) and Shorter part (b), with a split bar, the rectangle and the formula that was used.
- Select Copy results, or Download text to save golden-ratio-result.txt. Reset returns to the 1000 px example.
How to calculate the golden ratio
Two lengths are in the golden ratio when the whole divided by the longer part equals the longer part divided by the shorter part. Both ratios equal φ = (1 + √5) / 2, which is about 1.61803398875.
The calculator uses one pair of formulas for each starting point, which you choose under Known length. From the whole, a = whole / φ and b = whole / φ². From the longer part, b = a / φ and the whole is a + b. From the shorter part, a = b × φ and the whole is a + b.
A whole of 1000 gives a = 618.03398875 and b = 381.96601125. A longer part of 100 cm gives b = 61.803398875 cm and a whole of 161.803398875 cm. A shorter part of 10 in gives a = 16.1803398875 in. In every case the longer part is about 61.803 percent of the whole and the shorter part about 38.197 percent.
Golden rectangles and pixel layouts
The result also gives a golden rectangle, with the whole as the width and the longer part as the height. Swap the two for a portrait shape. A width of 1000 gives a height of 618.03398875.
Screens need whole pixels, so pixel mode adds a Rounded pixel layout. The whole and the longer part round to the nearest integer, with ties rounding up, and the shorter part is the remainder, so the two parts always fill the total. A 1000 px whole becomes 618 + 382 = 1000 px, and a 1920 px whole becomes 1187 + 733 = 1920 px.
Rounded sizes are close to φ but not equal to it, and the tool prints the real ratios of each layout. For 1000 px, whole / a ≈ 1.61812297735 and a / b ≈ 1.61780104712. A whole of 1 px gets no layout, because one part would round to zero pixels.
Limits
This tool works with one straight length and its two parts. It does not analyze a face or a photo, draw a spiral or a grid over an image, or build a type scale. It also does not resize an image; it gives the dimensions to use.
Units are labels only. Changing from cm to in does not convert the number, so enter the value in the unit you mean. The value must be a positive number without commas or units; zero, negative numbers and text show an error.
There is no fixed digit or size cap. A value such as 1e400 is outside the browser's number range and shows an error. Pixel layouts need whole numbers up to 9,007,199,254,740,991, so a 1e17 px whole gets decimal results only. Results show 12 significant digits, since φ is irrational and no finite decimal is exact.
Questions
How do I calculate the golden ratio of a length?
Divide the length by 1.618 to get the longer part, then subtract that part from the length to get the shorter part. For 1000, the parts are about 618.034 and 381.966. On this page, choose Whole (a + b), type the length in Value and select Calculate to get 12 significant digits.
Why is the golden ratio 1.618?
The golden ratio is the positive number φ for which φ² = φ + 1. Solving that equation gives φ = (1 + √5) / 2, which is 1.6180339887 to ten decimal places. Because √5 is irrational, φ has no exact decimal form, so 1.618 is a rounded value of an exact number.
Why is 61.8 percent linked to the golden ratio?
The longer part of a golden split is the whole divided by φ, which is 1 / 1.618, or about 0.618. So the longer part takes about 61.803 percent of the whole and the shorter part about 38.197 percent. The split bar under the result shows these two shares for every calculation.
How do I make a golden rectangle?
Use the whole as the width and the longer part as the height, or swap them for a portrait shape. For a width of 1000 px the height is 618.03398875 px, and the rounded layout is 1000 × 618 px. The calculator gives the sizes only; resize or crop the image with another tool.
Is 3.14 the golden ratio?
No. 3.14 is a rounded value of π, the ratio of a circle's circumference to its diameter, while the golden ratio φ is about 1.618. Both numbers are irrational, but they are different constants. This calculator works only with φ = (1 + √5) / 2, and π plays no part in its formulas.
Do the units convert my measurement?
No. The unit is a label on the same number all the way through. A value of 10 with Inches (in) gives parts in inches, and the same 10 with Centimeters (cm) gives the same numbers in centimeters. Only Pixels (px) changes the output, by adding the Rounded pixel layout.