Aspect Ratio Calculator
Calculate aspect ratios for images and videos. Enter width or height with a ratio (16:9, 4:3, 1:1) to find the other dimension.
Select Aspect Ratio
Dimensions
Preview
aspect-ratio: 16 / 9;Related Tools
EM/REMNEW
Convert between px, em, and rem CSS units with configurable base font size. Includes conversion table and CSS output.
CSS Grid
Visual CSS Grid layout builder. Set rows, columns, and gaps with live preview.
Box Shadow
Create CSS box shadows visually. Adjust blur, spread, offset, and color.
CSS Beautifier
Format and beautify messy CSS code. Minify or expand with proper indentation.
Frequently Asked Questions
What is an aspect ratio?
What is the most common aspect ratio?
How do I use the CSS aspect-ratio property?
How do I calculate dimensions from an aspect ratio?
What aspect ratio should I use for social media?
Can I use custom aspect ratios?
How to Use the Aspect Ratio Calculator
Whether you are sizing images for a website, setting up video exports, or designing responsive containers, our aspect ratio calculator helps you find the exact dimensions you need while maintaining perfect proportions.
Step 1: Select an aspect ratio. Choose from common presets like 16:9 (widescreen), 4:3 (standard), 1:1 (square), 21:9 (ultrawide), or enter a custom ratio. The calculator supports any ratio values you need.
Step 2: Enter a dimension. Type either a width or height value in pixels. The other dimension is calculated automatically based on the selected aspect ratio. Change either value and the other updates in real-time.
Step 3: Copy the CSS. The tool generates the CSS aspect-ratio property value ready to paste into your stylesheet. This modern CSS property is the cleanest way to create responsive containers that maintain their proportions at any size.
Understanding Aspect Ratios in Web Design
Aspect ratios are fundamental to responsive web design. When images and videos need to scale fluidly across screen sizes, maintaining the correct aspect ratio prevents stretching, squishing, or unwanted cropping. The CSS aspect-ratio property (supported in all modern browsers since 2021) provides a native way to enforce proportional sizing without padding hacks.
Before the aspect-ratio property, developers used the "padding-top percentage trick" where a container with padding-top: 56.25% (which is 9/16 * 100) would create a 16:9 container. While this technique still works, the aspect-ratio property is cleaner, more semantic, and works with both width and height constraints. It also integrates naturally with CSS Grid and Flexbox layouts.
Common Aspect Ratios and Their Uses
16:9 (1.78:1) - Widescreen. The standard for HD and 4K content. Used by YouTube, most streaming platforms, and virtually all modern monitors and TVs. Common resolutions: 1920x1080 (Full HD), 2560x1440 (QHD), 3840x2160 (4K UHD).
4:3 (1.33:1) - Standard. The classic TV and early computer monitor ratio. Still used for presentations (PowerPoint defaults to 4:3), some tablets (iPad), and certain photography compositions. Common resolutions: 1024x768, 1600x1200.
1:1 - Square. Instagram popularized the square format for social media. Used for profile pictures, thumbnails, and album artwork. The equal proportions create a balanced, symmetrical frame suitable for centered subjects.
9:16 (0.56:1) - Vertical. The vertical video format used by TikTok, Instagram Stories, and YouTube Shorts. As mobile-first content dominates, this ratio has become essential for social media marketing and content creation.