Tool guide
About this tool.
- An aspect ratio is the proportion of width to height. 1920 x 1080 reduces to 16:9 by dividing both by their greatest common divisor.
- Decimal dimensions are scaled by 100 first so the divisor can be found on whole numbers. The decimal ratio is width / height, and the padding fallback is height / width as a percentage.
- The nearest common ratio is picked from 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1, 5:4, 4:5, 21:9, 1.91:1 and 2.39:1, with the signed deviation in percent.
- Resizing images or video while keeping the proportions.
- Writing aspect-ratio CSS for responsive embeds and cards.
- Checking how far an odd resolution is from a standard ratio.
- Using the padding-top hack for browsers without aspect-ratio.
Enter the width and height. The output shows the simplified ratio, the decimal ratio and the nearest common ratio with its deviation.
The aspect-ratio line and the padding-top fallback are listed together so you can copy them as a pair.
Set Solve for to Height or Width and enter the other target dimension to get the missing size.
Copy the result or download aspect-ratio.txt.
- 1920 x 1080 → 16:9, 1.7778, padding-top: 56.25%;
- 1920 x 1080 solved for height at width 1280 → 720
- 1366 x 768 → 683:384, nearest 16:9 (+0.0488 %)
- 1080 x 2400 → 9:20, nearest 9:16
- 3000 x 2000 solved for width at height 600 → 900
- 512 x 512 → 1:1
- Width and height are 0.01 to 1,000,000.
- Decimal dimensions are scaled by 100 before the greatest common divisor is found.
- The deviation is signed: plus means wider than the common ratio.
- Results are rounded to four decimals with trailing zeros removed.
- The solved line only appears when Solve for is Width or Height.
- Out-of-range or non-numeric values are rejected, never clamped.