Ratio / ToolsOne frame. Every proportion.

Aspect Ratio Generator

To generate exact whole-pixel sizes for a ratio A:B, first reduce the ratio, then multiply both terms by the same positive whole number n. Under width and height limits, use nmax = floor(min(Wmax ÷ A, Hmax ÷ B)).

Example16:9 under 1000 × 700 → nmax = 62 → largest exact size = 992 × 558Generate sizes →
992 × 558n 62976 × 549n 61960 × 540n 60944 × 531n 59
A pipeline that reduces a ratio, finds the largest allowed multiplier, and creates exact pixel dimensions
The generator uses integer multiplication instead of calculating a fractional side and rounding it.

Generate exact dimensions under two limits

Reduced ratio 16:9. Largest multiplier: 62.

  1. 992 × 558
  2. 976 × 549
  3. 960 × 540
  4. 944 × 531
  5. 928 × 522
  6. 912 × 513

The form reduces equivalent input such as 32:18 to 16:9 before generating. This prevents duplicate sequences and ensures each step changes by the smallest exact width and height increments.

Find the largest multiplier that fits

For width cap Wmax and height cap Hmax, divide each cap by its matching reduced ratio term. The smaller quotient is the active constraint. Round that quotient down because n must be a whole number.

Width limit
1000 ÷ 16 = 62.5

Height limit
700 ÷ 9 = 77.777…

The smaller value is 62.5, so nmax = floor(62.5) = 62. Multiplying gives width 16 × 62 = 992 and height 9 × 62 = 558. The next multiplier, 63, would produce a width of 1008 and exceed the 1000-pixel cap.

A 992 by 558 exact 16 by 9 rectangle inside width and height caps of 1000 by 700
The width cap controls this example; the result leaves 8 px of width capacity and 142 px of height capacity.

Create a descending sequence without rounding

Start with nmax and subtract one for each smaller result. For 16:9 with nmax 62, the first five pairs are 992 × 558, 976 × 549, 960 × 540, 944 × 531, and 928 × 522. Every pair remains exact because both sides use the same multiplier.

Five exact 16 by 9 dimension pairs generated by decreasing the shared multiplier
A generated sequence is predictable: each step changes by 16 px in width and 9 px in height.

You can generate upward instead by starting at n = 1 and adding one. A practical tool normally returns the largest values first because those are closest to the stated limits, but the mathematical sequence is the same in either direction.

Verify every generated pair

Three steps to reduce, multiply, and verify generated aspect ratio dimensions
Generation is reliable when reduction, a shared multiplier, and an equality check all agree.

For a reduced ratio A:B and generated dimensions W:H, verify W × B = H × A. For 992 × 558 at 16:9, 992 × 9 = 8,928 and 558 × 16 = 8,928. Equal products prove the pair is exact.

Ratio and capsnmaxLargest exact pairCheck
16:9 under 1000 × 70062992 × 558992 × 9 = 558 × 16
4:3 under 1200 × 10003001200 × 9001200 × 3 = 900 × 4
9:16 under 1080 × 19201201080 × 19201080 × 16 = 1920 × 9
3:2 under 1500 × 8004001200 × 8001200 × 2 = 800 × 3

The limiting side can change from one row to another. The formula handles that automatically by selecting the smaller allowed multiplier before flooring it.

Aspect ratio generator questions

How do I generate several exact aspect-ratio sizes below a width and height limit?

Reduce A:B, calculate floor(min(Wmax ÷ A, Hmax ÷ B)), then multiply both ratio terms by that number and the smaller positive integers below it.

Why reduce the ratio before generating sizes?

Reduction produces the smallest integer step. Using 32:18 without reduction would skip valid 16:9 sizes that use odd multipliers of 16 and 9.

Does an aspect ratio generator resize an image?

No. This generator calculates dimension pairs. It does not upload, edit, crop, pad, or export an image.

Can a limit be too small for a ratio?

Yes. If the calculated maximum multiplier is less than 1, no positive whole-pixel pair for the reduced ratio fits under both limits.