Exact Integer Aspect Ratio Checker
Reduce the ratio to p:q. A known width gives an integer height exactly when that width is divisible by p; a known height works exactly when it is divisible by q. At 16:9, width 1366 fails because 1366 is not divisible by 16. Its exact height is 768.375 px, and the nearest exact pairs are 1360 × 765 and 1376 × 774.
1366 px wide at 16:9: not exactNot an exact integer pair
Nearest exact pairs: 1360 × 765 (6 px below) and 1376 × 774 (10 px above).
Proof: reduced ratio 16:9; 1366 mod 16 = 6.
The exact test in four operations
Start with ratio numerator a and denominator b. Divide both by gcd(a,b) to get the reduced pair p:q. Every exact integer size is then kp × kq, where k is a positive integer. This is stronger than calculating the missing edge and rounding it: it tells you whether an integer answer exists before any pixels are changed.
Known width W: H = Wq / p, exact only if W mod p = 0.
Known height H: W = Hp / q, exact only if H mod q = 0.
For 16:9 and width 1366, gcd(16,9) = 1, so p = 16 and q = 9. Division gives 1366 / 16 = 85 remainder 6. The missing height is 1366 × 9 / 16 = 768.375, which cannot be a whole-pixel edge. The verdict is therefore “not exact” without relying on a decimal ratio.
Nearest exact sizes around 1366
Multiplier 85 produces 16 × 85 = 1360 and 9 × 85 = 765. Multiplier 86 produces 1376 × 774. The lower pair changes the requested width by -6 px; the upper pair changes it by +10 px. Because 6 is smaller than 10, 1360 × 765 is the closest exact 16:9 pair by width.
| Candidate | Cross products | Result | Width change |
|---|---|---|---|
| 1360 × 765 | 1360 × 9 = 765 × 16 = 12,240 | Exact | -6 px |
| 1366 × 768 | 12,294 vs 12,288 | Difference 6 | 0 px |
| 1376 × 774 | 1376 × 9 = 774 × 16 = 12,384 | Exact | +10 px |
Why 1366 × 768 is close but not exact
Rounding 768.375 down gives the familiar pair 1366 × 768. Its displayed ratio is 1366 / 768 = 1.7786458…, while 16 / 9 = 1.7777778…. The relative ratio drift is ((1366 / 768) / (16 / 9) - 1) × 100 = 0.0488%.
A cross-product audit avoids decimal precision entirely. Compare width × q with height × p. For 1366 × 768, those products are 12,294 and 12,288, a difference of 6. Equal products prove exact proportionality; unequal products prove drift. A small difference may be visually harmless, but it is still not an exact integer 16:9 pair.
The same method works after reducing ratios such as 1920:1080 to 16:9. Using the reduced pair matters: testing a width against 1920 would reject valid sizes such as 1280 × 720, while testing divisibility by 16 correctly accepts them.
When to require exact integer dimensions
Use the exact test when a template, generated asset set, pixel grid, or automated export must repeat one rational proportion with no rounding drift. If a platform requires a fixed non-exact pair, keep that required pair; this checker reports the arithmetic and does not override delivery specifications.
Aspect ratio is width divided by height, with width listed first. CSS can preserve a preferred ratio when one box dimension is automatic, but a rendered or exported bitmap still ends with integer pixel dimensions. Checking divisibility before export makes the rounding decision explicit.
Exact integer ratio questions
Can every width make an exact 16:9 image?
No. After reduction, an exact 16:9 width must be a multiple of 16. Its matching height is the same multiplier times 9.
Is 1920 × 1080 exactly 16:9?
Yes. Both dimensions share multiplier 120: 16 × 120 = 1920 and 9 × 120 = 1080.
Should I round the calculated opposite edge?
Only if a near match is acceptable. For an exact pair, move the known edge to a neighboring multiple of the reduced ratio component.
How do I verify an existing pair?
Cross-multiply. Width × ratio height must equal height × ratio width.
Sources
References checked on October 23, 2026: the W3C definition of width-to-height aspect ratio, the MDN ratio data type, and the MDN aspect-ratio guide. The divisibility rules, neighbor search, cross-product tests, and numerical comparisons above were independently derived and calculated for this page.