Aspect Ratio Calculator
Calculate aspect ratios, missing dimensions, and simplify ratios for any image or screen size.
Aspect Ratio Calculator
Solve for:
Common aspect ratios:
How to Use
Enter known width and height
Input existing dimensions to calculate and simplify the aspect ratio.
Find a missing dimension
Enter a ratio and one dimension to calculate the matching width or height.
Use preset ratios
Select from common presets: 16:9 for YouTube, 1:1 for Instagram, 9:16 for portrait video.
Compare ratios visually
Use the visualization to see how different aspect ratios compare in proportion.
What is Aspect Ratio?
Aspect ratio describes the proportional relationship between width and height. It is expressed as W:H (e.g. 16:9 for widescreen or 4:3 for standard). Maintaining aspect ratio prevents images and videos from appearing stretched or distorted.
Real-World Examples & Use Cases
Video Production and YouTube Thumbnails
Video creators producing YouTube content, course videos, and webinars need to work within specific aspect ratios. YouTube recommends 1280×720 minimum for thumbnails (16:9) and 1920×1080 for full HD video. Vertical video for Shorts/TikTok uses 1080×1920 (9:16). Calculating how to scale a 1366×768 source to 1920×1080 width while maintaining 16:9, or finding what width a 2160px-high 16:9 video should be (3840px), are both immediate aspect ratio calculations.
Responsive Web Image Sizing
Web developers implementing responsive images with CSS aspect-ratio property, picture srcset, and image CDN resize parameters need to calculate dimensions that maintain correct proportions at each breakpoint. A hero image sized at 1200×628 (1.91:1 ratio for social sharing) needs to be scaled to 800×418 for tablet and 400×209 for mobile without distortion. An aspect ratio calculator confirms the height at each width, or the equivalent ratio as a percentage padding-top trick (height/width × 100 = 52.3% for 1.91:1).
Social Media Content Dimensions
Social media platforms have specific aspect ratio requirements for each content type. Instagram feed posts: 1:1 (1080×1080), 4:5 portrait (1080×1350), 1.91:1 landscape. Facebook link previews: 1.91:1 (1200×628). LinkedIn cover images: 1584×396 (4:1). Twitter/X cards: 2:1 (1200×600). TikTok/Reels: 9:16 (1080×1920). An aspect ratio calculator helps content creators prepare a source image for the exact dimension requirements of each platform without distortion or unintended cropping.
UI/UX Design and Wireframing
Interface designers choosing screen resolutions, dialog sizes, and component proportions use aspect ratio relationships to maintain visual consistency. A card component that's 320×180px is exactly 16:9 — maintaining this ratio at other sizes (240×135, 480×270) ensures consistent appearance across breakpoints. Designing for specific device screens requires knowing that an iPhone 14 (390×844 points) has approximately a 9:19.5 ratio, while a standard laptop (1440×900) is exactly 8:5.
How It Works
Aspect Ratio Formulas: Ratio from dimensions: ratio = width : height simplified using GCD (Greatest Common Divisor): GCD(1920, 1080) = 120 1920/120 : 1080/120 = 16 : 9 JavaScript GCD (Euclidean algorithm): function gcd(a, b) { return b === 0 ? a : gcd(b, a % b); } function simplifyRatio(w, h) { const d = gcd(w, h); return w/d + ':' + h/d; } Width from height (maintaining ratio): width = height × (ratioW / ratioH) Example: Height=1080, Ratio=16:9 width = 1080 × (16/9) = 1920 Height from width: height = width × (ratioH / ratioW) Example: Width=1280, Ratio=16:9 height = 1280 × (9/16) = 720 Decimal ratio (divide-form): 1920:1080 = 1.778 (= 16/9) 2560:1080 = 2.370 (= 21:9 ultra-wide) 1080:1920 = 0.5625 (= 9:16 portrait) Padding-top CSS trick (maintaining ratio): padding-top % = (height/width) × 100 For 16:9: (9/16) × 100 = 56.25% Modern alternative: aspect-ratio: 16/9; (CSS property) Pixel density and aspect ratio: For crisp display at 2x DPI: multiply both dimensions by 2 16:9 at 2x: 1920×1080 → 3840×2160 (same ratio, double resolution)
Frequently Asked Questions
What is the most common aspect ratio for websites?▼
What does the CSS aspect-ratio property do?▼
Why do my images look stretched on some devices?▼
What is the difference between 4:3 and 16:9?▼
How do I crop an image to an exact aspect ratio?▼
Related Tools
Explore other tools in this category.
JSON Formatter
Format, validate, prettify, and minify your JSON data quickly.
Password Strength Checker
Analyze how secure your password is and generate a strong one instantly.
CSS Unit Converter
Convert between CSS units: px, rem, em, pt, vw, vh, cm, mm, and inches.
Binary ? Text Converter
Convert plain text to binary code and decode binary back to readable text.
Text to Binary Converter
Convert letters and strings into computer binary format.
QR Code Generator
Create and download customized QR codes for URLs, text, and contacts.