Aspect Ratio Calculator & Resizer
Find the simplified aspect ratio of any width and height, scale dimensions while keeping proportions, compare against 16:9, 4:3, 9:16 and cinema ratios, and copy CSS aspect-ratio, padding-top and Tailwind snippets.
Aspect Ratio Workspace
Enter a width and height to get the ratio, or pick a ratio and a target size to scale proportionally.
/* Modern */
.media {
aspect-ratio: 16 / 9;
width: 100%;
}
/* Legacy padding hack */
.media-legacy {
position: relative;
padding-top: 56.25%;
}
.media-legacy > * {
position: absolute;
inset: 0;
}
/* Tailwind */
<div class="aspect-[16/9]"></div>Why Creators Use the Agenvix Aspect Ratio Calculator
Exact ratios and scaled dimensions without a spreadsheet.
True Simplification
Dimensions are reduced with the greatest common divisor, so 1920 × 1080 reports 16:9 and 1366 × 768 honestly reports 683:384 with 16:9 as the nearest standard.
Scale Either Side
Lock the ratio, enter a new width or a new height, and get the matching dimension plus a table of common resolutions.
Front-End Snippets
Copy modern aspect-ratio CSS, the padding-top percentage fallback for older browsers and the Tailwind aspect-[w/h] class.
Platform Presets
YouTube, Instagram, TikTok, cinema and Open Graph ratios are one click away with their typical uses.
Simple as 1-2-3
How the Calculator Works
Two modes, three steps.
Enter Dimensions
Type the width and height of an image, video or screen. Decimals are accepted.
Get the Ratio
The tool divides both sides by their greatest common divisor and shows the decimal ratio, orientation and nearest standard ratio.
Scale or Copy
Switch to Scale mode to compute new dimensions, or copy the CSS snippet for a responsive container.
Common Aspect Ratios
The ratios you meet most often and where they come from.
| Feature / Specification | Best Use Case | Engine / Output Standard | Privacy & Security | Performance Rating | Action |
|---|---|---|---|---|---|
| 16:9 (1.78) | YouTube, HD/4K video, laptops | 1920×1080, 3840×2160 | Landscape | Universal | |
| 9:16 (0.56) | Stories, Reels, Shorts, TikTok | 1080×1920 | Portrait | Social video | |
| 4:3 (1.33) | iPad, legacy TV, slides | 1024×768, 2048×1536 | Landscape | Classic | |
| 3:2 (1.5) | DSLR & mirrorless photos | 6000×4000 | Landscape | Photography | |
| 1:1 and 4:5 | Instagram feed & portrait | 1080×1080, 1080×1350 | Square / portrait | Social | |
| 21:9 and 2.39:1 | Ultrawide & cinema | 3440×1440, 2048×858 | Landscape | Cinematic | |
| 1.91:1 | Open Graph link images | 1200×630 | Landscape | Web |
Aspect Ratios Explained
1. What an aspect ratio is
An aspect ratio is the proportional relationship between width and height, written width:height. 1920 × 1080 and 1280 × 720 are different resolutions with the same 16:9 ratio because both reduce to the same simplest fraction. The calculator finds that fraction with the greatest common divisor and also reports the decimal form (1.78:1), which is how cinema ratios are usually quoted.
2. Scaling without distortion
To resize while keeping proportions, multiply or divide both sides by the same factor: new height = new width × (height ÷ width). Rounding to whole pixels can leave a one-pixel difference; the resolution table shows where that happens so you can pick clean sizes.
- Video encoders prefer even dimensions, ideally multiples of 8 or 16.
- Cropping changes the ratio; scaling does not.
3. Aspect ratios in CSS
The aspect-ratio property is supported in all modern browsers and reserves space before media loads, which prevents layout shift and improves Core Web Vitals. For very old browsers the padding-top hack works because percentage padding is relative to the element width: 9 ÷ 16 = 56.25 percent for 16:9. Tailwind exposes the same idea through aspect-video, aspect-square and arbitrary aspect-[4/5] classes.
4. Platform requirements
YouTube displays 16:9 and letterboxes everything else; Shorts, Reels and TikTok want 9:16 at 1080 × 1920; Instagram feed posts accept 1:1 to 4:5; Open Graph previews crop to about 1.91:1 at 1200 × 630; and most cinema releases use 1.85:1 or 2.39:1. Choose the ratio before shooting or designing, because cropping afterwards costs resolution and composition.
Everything you need to know about aspect ratios
Simplification, scaling, CSS and common sizes.
How do I calculate an aspect ratio?
Divide both the width and the height by their greatest common divisor. 1920 and 1080 share a GCD of 120, giving 16:9. The calculator does this instantly, including for decimal inputs.
Why does 1366 × 768 not show as 16:9?
Because it is not exactly 16:9: it reduces to 683:384 (1.7786:1). The tool reports the exact ratio and names 16:9 as the closest standard ratio so you know how far off it is.
How do I resize an image and keep its aspect ratio?
Use Scale mode. Enter the original ratio or dimensions, then type the new width; the matching height is calculated as new width × height ÷ width (or vice versa).
What is the padding-top percentage for 16:9?
56.25 percent, which is 9 ÷ 16 × 100. For 4:3 it is 75 percent and for 1:1 it is 100 percent. The CSS panel calculates this for any ratio.
Which aspect ratio should I use for social media?
16:9 for YouTube and link videos, 9:16 for Stories, Reels, Shorts and TikTok, 1:1 or 4:5 for Instagram feed posts, 2:3 for Pinterest and 1.91:1 for Open Graph link previews.
Does the calculator accept decimal dimensions?
Yes. Decimals are scaled to whole numbers before simplification, so 1.5 × 1 correctly reports 3:2.
What does orientation mean here?
Landscape when width is greater than height, portrait when height is greater and square when they are equal.
Is any data sent to a server?
No. All calculations run in your browser.
Related Developer Utilities
Discover companion utilities engineered for zero-log speed and browser-side execution.
Image Converter
Convert PNG, JPG, WebP, BMP, GIF, TIFF images in your browser with zero server upload.
PX to REM Converter
Convert px to rem and em at any root font size, including bulk conversion of whole CSS snippets.
CSS Box Shadow Generator
Layer multiple box shadows with live preview, elevation presets and copy-ready CSS or Tailwind output.
CSS Gradient Generator
Design linear and radial gradients with precise colour stops and copy production ready CSS.
Icon Pack Generator
Generate favicon suites (16x16 up to 512x512) and HTML meta code from any image.
Image to Base64 Converter
Encode images to Base64 data URIs, HTML, CSS and Markdown snippets, or decode Base64 back to an image.
More in Media & Graphics
Specialized utilities within the same technical domain
