About the Aspect Ratio
This calculator reduces any pixel width and height, like a photo, video frame, or display resolution, down to its simplest whole-number ratio, such as 16:9 or 4:3. It's useful for anyone setting up video export settings, choosing a print size, or figuring out what standard aspect ratio a set of dimensions belongs to.
How It Works
Enter a width and height (in any consistent unit, typically pixels), and the calculator finds their greatest common divisor, then divides both numbers by it to get the simplified ratio. It also reports the plain decimal ratio (width divided by height) for cases where a rounded whole-number ratio isn't precise enough.
Formula & Methodology
The greatest common divisor is found recursively using the Euclidean algorithm: gcd(a, b) equals a when b is 0, otherwise it equals gcd(b, a mod b). Applying this to the rounded width and height gives the largest number that divides both evenly, the same method used to reduce a numeric fraction to its lowest terms. If the computed divisor comes out as zero, which only happens if both inputs round to zero, the calculator falls back to a divisor of 1 to avoid dividing by zero.
Examples
Full HD resolution
A width of 1920 and height of 1080 share a greatest common divisor of 120, simplifying to a ratio of 16:9 with a decimal ratio of 1.7778.
Standard photo print
A 4000 by 3000 pixel photo has a GCD of 1000, simplifying to 4:3 with a decimal ratio of 1.3333, the classic point-and-shoot camera ratio.
Advantages
- Automatically finds the true simplified ratio using the greatest common divisor rather than requiring you to guess a standard ratio and check it.
- Reports both the whole-number ratio and the decimal ratio, useful when comparing dimensions that don't match a named standard.
- Works for any pair of dimensions, not just a fixed list of common screen or video sizes.
Common Mistakes
- Entering height before width (or vice versa) and misreading the resulting ratio as flipped from what was intended.
- Expecting oddly-sized dimensions, like a cropped photo, to always simplify to a clean named ratio such as 16:9 or 4:3, when many real dimensions don't.
- Using non-whole-number dimensions and being surprised the tool rounds them first, which can shift the simplified ratio slightly from the exact decimal value.
Edge Cases to Watch For
- Width and height are rounded to the nearest whole number before finding their greatest common divisor, so non-integer inputs are treated as their rounded equivalents.
- If the GCD calculation returns zero, the calculator substitutes a divisor of 1 instead, preventing a division-by-zero error.
- Two dimensions that share no common factors besides 1 (like 1921 and 1080) will return an unsimplified-looking ratio, since there's no smaller equivalent fraction.
Common Use Cases
- Video editors and content creators checking whether footage matches a standard export ratio like 16:9 or 21:9.
- Photographers and print shops confirming what standard ratio a set of pixel dimensions corresponds to before cropping.
- Web and app designers verifying that a set of image or container dimensions matches an intended design ratio.