AspectRatio Studio

Ratio Simplifier & CSS Padding-Bottom Generator

Web & Video Standards

Calculate & Scale Aspect Ratios

Lock proportions, calculate missing dimensions, simplify integer ratios, and generate responsive CSS and Tailwind code snippets.

Creative Assets Explore stock video libraries, responsive web design courses, and social media media asset kits.

Dimensions & Aspect Ratio

Proportions Locked
px
px
1.0x
0.1x (Thumbnail) 1.0x (Original) 3.0x (HiDPI / Retina)

👁 Live Aspect Ratio Box Preview

16:9
1920 × 1080 16 : 9
Aspect Ratio 16 : 9 Simplified
Decimal Ratio 1.778 : 1 Ratio
Padding-Bottom 56.25% Responsive %

💻 Responsive CSS Embed Snippets

Modern CSS (aspect-ratio)
aspect-ratio: 16 / 9;
Tailwind CSS Utility Class
aspect-video
Legacy Responsive Container Hack (Padding-Bottom)
.responsive-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* (1080 / 1920) * 100% */
}
.responsive-container iframe,
.responsive-container video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

Understanding Aspect Ratios in Modern Responsive Web Design

1. The Math of Aspect Ratio Simplification

An aspect ratio represents the proportional relationship between width and height. To find the simplest whole-number ratio, divide both width and height by their Greatest Common Divisor (GCD):

GCD(1920, 1080) = 120
1920 / 120 = 16
1080 / 120 = 9 ➔ 16 : 9

For non-standard resolutions (e.g. 1200 × 628), our engine automatically finds the nearest standard decimal equivalent (1.91:1).

2. Preventing Cumulative Layout Shift (CLS)

Google's Core Web Vitals strictly penalize websites that suffer from Cumulative Layout Shift (CLS) when images or video embeds load and push surrounding paragraphs downward.

By declaring aspect-ratio: 16 / 9; or reserving space with intrinsic padding, the browser reserves the exact rectangular space before image assets download over the network, achieving a perfect 0 CLS score.

Frequently Asked Questions

Why does percentage padding calculate relative to width?

According to the official W3C CSS specification, top and bottom margins and padding defined as percentages are calculated against the inline size (width) of the containing block. This deliberate design decision is what enables responsive vertical boxes to scale proportionally as the viewport shrinks.

What is the exact aspect ratio of an Instagram Story or Reel?

Instagram Stories, Reels, TikTok videos, and YouTube Shorts all utilize a 9:16 vertical aspect ratio. The recommended resolution is 1080 pixels wide by 1920 pixels tall.

How do I embed a 16:9 YouTube iframe responsively?

In modern CSS, simply apply width: 100%; aspect-ratio: 16 / 9; border: none; directly to your iframe tag. In Tailwind CSS, add the utility classes class="w-full aspect-video".