How to use
- Type the original width and height (pixels, inches, millimeters, anything), or click one of the Common ratio chips.
- The ratio is drawn as a frame of that exact shape, with your width and height on its edges, next to the simplified ratio, its decimal value and its common name (if it has one).
- Under Scale to a new size, type a new width or height, and the other one updates to keep the same ratio.
- Click any resolution in the list, or the Copy result button, to copy it.
One ratio, two directions
This tool solves the two problems that come up together in practice: what ratio is this image already, and what height do I need for a new width at that same ratio(or the reverse). Entering a width and height answers the first; the scale section answers the second, using the exact ratio just computed rather than a rounded version of it, so a long chain of resizes never drifts off the original proportions.
Example
1920 × 1080 (a common HD video frame) reduces to:
16:9 (16:9 (Widescreen/HD video))
Decimal: 1.7778
CSS padding-hack: 56.25%Scaled to a 1280px-wide version, the height becomes:
1280 × 720 (same 16:9 ratio, smaller size)Options explained
- Width / Height: any positive number, in pixels, inches, millimeters or any other unit, as long as both use the same one. Decimals are supported and reduced exactly.
- Common: one-click chips for 16:9, 16:10, 4:3, 3:2, 1:1, 4:5 and 9:16. Each fills the ratio numbers themselves (16 and 9, say), so the result and the resolution list below start from that ratio. 21:9 is deliberately not a chip: it is not a reduced fraction, so it would show as 7:3 (see Edge cases).
- The frame is drawn at the real ratio. Extremely wide or tall ratios (beyond about 12:1 or 1:6) are drawn at that limit so the frame stays visible; the numbers on its edges and the result are always the real ones.
- Swap (⇅): exchanges width and height, turning a landscape ratio into its portrait equivalent (16:9 ↔ 9:16) in one click.
- New width / New height: type either one to solve for the other at the current ratio. Clearing one clears the other, since there's nothing to scale from.
- Common resolutions: exact integer multiples of the simplified ratio near well-known video and display widths. Click any one to copy it.
Edge cases and common errors
- Zero or negative dimensions are refused: "Width and height must both be greater than 0." (a ratio needs two positive numbers).
- Non-numeric input names the specific field that failed, rather than a generic error.
- Some ratios never land exactly on a "nice" resolution. 21:9, 3:2 and similar odd ratios don't divide evenly into common video widths (1280, 1920, 2560, 3840…), so their resolution list is left shorter or skipped for a given size rather than shown as a misleading rounded value. See the FAQ on ultrawide monitors for the specific reason.
- A ratio with no common name (most arbitrary width/height pairs) shows "No common name for this exact ratio" instead of forcing a nearest match. The 0.5% tolerance used for naming is tight enough that it won't mislabel a genuinely different ratio.
- Square images (equal width and height) are labeled "Square," a third category alongside landscape and portrait, not folded into either.
Do the same thing in code
// JavaScript: reduce width/height to a ratio
function gcd(a, b) { return b ? gcd(b, a % b) : a; }
const g = gcd(width, height);
const ratio = `${width / g}:${height / g}`;
// Scale a new width to match an existing ratio
const newHeight = newWidth * (height / width);
/* CSS: lock an element to a ratio without JavaScript */
.box { aspect-ratio: 16 / 9; }Converting the other direction (pixels into a file size instead of a shape) is a job for theData Size Converter. If the number you're scaling is a timestamp or a duration rather than a dimension, see theUnix Timestamp Converter.