Aspect Ratio Calculator
Enter a width and height to get the reduced ratio, or choose a ratio such as 16:9 and enter one side to get the other. Whole-pixel sizes are rounded to the nearest integer. Calculations stay in this browser.
Choose what you know
Limits
- Width, height, and ratio parts must be greater than 0, and each side at most 100,000,000.
- Decimal sides are converted through a shared power of 10, then reduced. Scientific notation is not accepted.
- Whole-pixel sides are rounded; the exact values are also shown.
See the full list under Limits and how it works below.
Ratio and size
How to use Aspect Ratio
- Choose a starting pointStart from a width and height to reduce the ratio, or start from a ratio such as 16:9, 4:3, 9:16, or 1:1 and one known side.
- Enter the valuesUse any positive units (pixels are typical). You can also enter a custom a:b ratio. Decimal sides are allowed.
- Read the ratio or the missing sideThe reduced ratio uses the greatest common divisor. If you asked for the other side, the exact length and the nearest whole-pixel size are both shown.
Limits and how it works
- Width, height, and ratio parts must be greater than 0, and each side at most 100,000,000.
- Decimal sides are converted through a shared power of 10, then reduced. Scientific notation is not accepted.
- Whole-pixel sides are rounded; the exact values are also shown.
- This page does not crop, pad, or resize a file.
How the aspect ratio is calculated
The reduced ratio is (W / d):(H / d), where d is the greatest common divisor of the two sides. For whole-number sides, d is found with Euclid’s algorithm (Elements, Book VII). For decimal sides, W and H are first written as integers over a shared power of 10, then the same gcd is applied. 1920 × 1080 therefore reduces to 16:9, because gcd(1920, 1080) = 120.
When a ratio a:b and one side are known, the missing side is W = H × (a / b) or H = W × (b / a). Whole-pixel sizes are those exact values rounded to the nearest integer (halves round toward +∞, as in JavaScript Math.round). If a common preset such as 16:9 is within 0.25% of your width÷height, the page says so, even when the reduced ratio is not exactly 16:9.
This page only calculates dimensions. It does not crop or resize a file. To change an image or a video, use Image Resizer, Crop Image, or Resize Video.
Frequently asked questions
Is this the same as Image Resizer or Crop Image?
No. Those tools change a file in this browser. This page only works out a ratio or a missing side from the numbers you enter.
Why is 1366 × 768 not 16:9?
The reduced ratio of 1366 × 768 is 683:384. That is close to 16:9 (within 0.25%), but it is not exact, so both the reduced ratio and the nearby 16:9 preset are shown.
Will the missing side be a whole number?
Not always. The exact length is shown, and a whole-pixel size is also given by rounding to the nearest integer. For example, a 16:9 width of 1920 gives an exact height of 1080, but a width of 1921 does not.
Related tools
All toolsImage Resizer & Crop Presets
Resize images by pixels, percentage, or social presets in browser.
Crop Image
Crop photos with aspect presets and pixel-exact, touch-friendly handles.
Resize Video
Change video resolution to 4K, 1080p, 720p, 480p or a custom size.
Percentage Calculator
Calculate percentages, percent change, discounts, and markups fast.