Aspect Ratio Calculator
This aspect ratio calculator lets you simplify a width-to-height ratio to its lowest terms, scale a set of dimensions to a new size while maintaining the same ratio, and find a missing width or height when you know the other dimension and the original ratio. Aspect ratio describes the proportional relationship between the width and height of any rectangle, expressed as two integers separated by a colon. The same 16:9 ratio applies to a 1920x1080 Full HD screen and a 3840x2160 4K screen; only the physical size changes. Knowing the simplified ratio lets you quickly check whether two different resolutions share the same proportions. Designers, developers, and video editors frequently need to scale an image or video from one resolution to another without distortion, which requires maintaining the original aspect ratio exactly. You enter the original width and height of your image, video, or container, and the calculator shows the simplified ratio. You can then enter a target width to find the matching height, or a target height to find the matching width. The scaling calculation multiplies the new dimension by the ratio of the original opposite dimension over the original same dimension. The simplification works by dividing both width and height by their greatest common divisor (GCD), which is found using the Euclidean algorithm. Values are rounded to the nearest whole pixel. This tool suits web developers setting responsive image dimensions, video producers exporting at different resolutions, graphic designers creating print and screen artwork, and photographers cropping images to specific formats.
How it works
The simplified ratio is found by dividing both the original width and height by their greatest common divisor (GCD), computed using the Euclidean algorithm: GCD(a, b) = GCD(b, a mod b) until b reaches zero, at which point GCD is a. The decimal ratio is the original width divided by the original height. If you supply a new width, the scaled height is: round(new width times original height divided by original width). If you supply a new height, the scaled width is: round(new height times original width divided by original height). If both are supplied, the new width takes priority.
Worked example
Original dimensions are 1920x1080. GCD(1920, 1080) = 120. Dividing both by 120 gives 16:9. The decimal ratio is 1920 divided by 1080 = 1.7778. Scaling to a new width of 1280: 1280 times 1080 divided by 1920 = 720 px. These match the default values pre-filled in the calculator above.
Related calculators
- Data Storage Converter: calculate file sizes for images and video at different resolutions.
- Percent Error Calculator: find how far a scaled dimension is from the exact proportional value.
- Numeral System Converter: convert pixel values between decimal, binary and hexadecimal.
- Circle Measurements Calculator: area, Circumference, Diameter, Radius.
- Circle Perimeter Calculator: circumference from Radius or Diameter.
- Crop Factor Calculator: Calculate the crop factor for any camera sensor size.
- Placeholder Image Calculator NZ: Generate a placeholder image of any size, with its aspect ratio, megapixels and a ready-to-use placeholder URL.