Golden ratio type scale generator from any base font size
A golden ratio type scale turns one familiar font size into a complete typographic hierarchy using the classical proportion phi.
Run — free
Enter a base size, choose how many larger and smaller steps you need, and receive a deterministic list of rounded values ready for design tokens, style guides, or CSS. Unlike a fixed heading preset, this generator exposes the depth of the scale and uses the full golden ratio between adjacent entries. You can keep the default pixel label or supply another unit without changing the underlying arithmetic.
Build the scale from a meaningful base
Begin with the size that anchors the reading experience rather than selecting the largest heading first. For a website, the base is usually the body copy size; for a presentation, it may be the ordinary slide text; for a print system, it could be the standard paragraph size in points. The generator treats that number as step zero. Each positive step multiplies it by phi, approximately 1.61803399, while each negative step divides it by the same ratio. This produces a consistent progression in both directions and keeps every entry mathematically related to the anchor. Choose steps_up to control how many larger values appear and steps_down to include captions, notes, or supporting labels below the base. Both controls are bounded so the result stays practical and easy to inspect. A base of sixteen with three steps above, for example, creates progressively stronger display sizes while preserving sixteen as the exact conceptual center. The unit field is a label rather than a converter: sixteen pixels and sixteen points produce the same numeric scale but communicate different intended environments. This distinction avoids pretending that unrelated physical and screen units can be converted without context. Start from a size you already know works for your readers, then use the scale to explore hierarchy around it.
Read, round, and apply the generated values
The response lists entries from the largest requested step down to the smallest, making it straightforward to scan as a typographic hierarchy. Every row includes its signed step, numeric size, formatted size with the chosen unit, and a simple role describing whether it is larger than, equal to, or smaller than the base. Step zero is always marked as base. The formula field records the exact rule used, which is useful when documenting design-token provenance or reviewing a generated theme later. Precision controls the number of decimal places in each size. Three decimal places work well for CSS and most digital design tools, while whole numbers may be preferable for constrained interfaces or print specifications that deliberately avoid fractions. Rounding occurs only after the power calculation, so intermediate steps do not accumulate rounding errors. If two nearby small values become equal under coarse precision, increase the precision rather than manually changing one value and breaking the proportion. Treat the output as a mathematically coherent starting system, not an obligation to assign every result. A compact product may use only the base and two larger entries, while an editorial site can consume most of the ladder. Copy numeric values into tokens such as font_size_base or font_size_display, and retain step numbers in comments so future maintainers can regenerate the system consistently instead of guessing where isolated values came from.
Balance classical proportion with practical typography
The full golden ratio creates dramatic contrast, which is precisely why it suits expressive editorial layouts, brand systems, posters, and landing pages. It can also become too spacious when many consecutive levels must fit inside a dense application. Use fewer steps when the ratio gives you more hierarchy than the interface needs, and test the chosen sizes with the actual typeface because x-height, weight, width, and optical sizing affect perceived scale. Responsive layouts may use different base sizes at different breakpoints while retaining the same step assignments, producing a family resemblance across viewports without forcing a large desktop display size onto a phone. Accessibility still begins with readable body text, comfortable line length, suitable line height, and adequate contrast; a pleasing ratio cannot rescue an undersized base or an unsuitable font. The tool intentionally calculates font sizes only and does not invent line height, letter spacing, weights, or semantic HTML. Those choices depend on language, medium, typeface, and content density. For automation, send the same inputs through the API for $0.002 per request and store the returned scale with your design tokens. Because the calculation uses no network, randomness, or current time, identical requests always return identical values. That makes the output suitable for build scripts, snapshot tests, documentation generators, and design-system audits where reproducibility matters as much as visual harmony.
What you can do with it
Design-system tokens
Create a reproducible ladder of font-size tokens around an established body size.
Editorial hierarchy
Explore strongly differentiated display, heading, body, caption, and note sizes for long-form layouts.
Theme generation
Generate deterministic scales for several bases and units inside an automated theme-building workflow.
FAQ
What ratio is used between adjacent steps?
Every adjacent step uses the full golden ratio, φ = (1 + √5) / 2, approximately 1.61803399.
Is the base included in the output?
Yes. The base is step zero and is included between the larger positive steps and smaller negative steps.
Does changing the unit convert the values?
No. The unit is a presentation label. The calculator does not claim that pixels, rems, ems, and points are interchangeable.
How many steps can I generate?
You can request zero through twelve steps in either direction, producing at most twenty-five entries including the base.
What does an API request cost?
Each successful API request costs $0.002. You can also use the browser version for interactive exploration.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/str/golden-type-scale \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"base_size":16}'const res = await fetch("https://api.kit.forhosting.com/str/golden-type-scale", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"base_size": 16
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/str/golden-type-scale",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"base_size": 16
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/str/golden-type-scale", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"base_size":16}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"base_size":16}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/str/golden-type-scale", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"base_size": 16
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "str.golden_type_scale",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |