📐 Aspect Ratio Calculator
Enter a ratio like 16:9 and one dimension to instantly get the other, or enter both width and height to reduce them to their simplest integer ratio. No sign-up, no upload — everything runs in your browser.
Preset Ratios
Enter a ratio and one dimension, or enter both dimensions to simplify.
About
The aspect ratio of an image or screen is the proportional relationship between its width and height. Common ratios include 16:9 (widescreen HD), 4:3 (classic TV and monitors), 1:1 (square), 21:9 (ultrawide cinema), 3:2 (DSLR sensors) and 9:16 (vertical video). This calculator handles two tasks: given a ratio and one dimension, it computes the missing dimension; given any two dimensions, it applies the Euclidean GCD algorithm to reduce them to their lowest-terms ratio and also displays the decimal ratio (width divided by height).
How to use
- Select a preset ratio (16:9, 4:3, 1:1, 21:9, 3:2, or 9:16) or type any custom W and H values into the Ratio fields.
- Enter the known dimension — Width or Height in pixels. Leave the other blank to have the tool compute it from the ratio.
- To simplify existing dimensions, enter both Width and Height. The tool applies the GCD algorithm and displays the lowest-terms ratio and decimal ratio.
- Enable Lock ratio to keep the proportions fixed while editing. Changing Width auto-updates Height and vice versa.
- Click Calculate to confirm the result. The result panel shows the simplified ratio, decimal ratio, width and height. Results are saved to your browser automatically.
FAQ
- What is aspect ratio?
- Aspect ratio is the proportional relationship between the width and height of a rectangle, expressed as W:H. A 1920x1080 screen has an aspect ratio of 16:9 because 1920/120 = 16 and 1080/120 = 9.
- How does the GCD simplification work?
- The tool uses the Euclidean algorithm to find the greatest common divisor of the two rounded integer dimensions, then divides both by that GCD. For example, 1280 and 720 share a GCD of 80, giving the simplified ratio 16:9.
- What does the decimal ratio mean?
- The decimal ratio is width divided by height, expressed as a single number followed by :1 (e.g., 1.778:1 for 16:9). It is useful for comparing ratios numerically or for CSS calculations using aspect-ratio property.
- Can I use this for non-pixel units like inches or centimeters?
- Yes. The calculator works with any unit — pixels, inches, millimeters, centimeters, or even arbitrary numbers. Aspect ratio is dimensionless, so just enter your values in the same unit and the math is identical.