Aspect Ratio Calculator

100% Client-Side Instant Result

Your results will appear here.

Ready to run.
Expert-Reviewed •
By OnlineToolHubs Team • Editorial Team OnlineToolHubs Editorial Team
100% Client-Side • No data leaves your browser Standard Formulas • Tested with established methods Free & Open Access • No signup required

About this tool

An aspect ratio describes the proportional relationship between an image or display screen’s width and height. Expressed as two numbers separated by a colon (W:H), common aspect ratios include 16:9 (standard widescreen TV/YouTube), 4:3 (legacy television/iPad), 1:1 (square/Instagram posts), 9:16 (vertical video/TikTok/Shorts/Reels), and 21:9 (ultrawide monitors/cinematic format).

When resizing images or videos for different platforms, maintaining the correct aspect ratio prevents distortion (stretching or squishing). If you change the width, the height must scale proportionally: New Height = New Width ÷ (Ratio Width ÷ Ratio Height).

Our Aspect Ratio Calculator allows you to: (1) Find missing width or height based on any target ratio; (2) Calculate the simplified ratio of any existing width and height; (3) Apply platform presets (YouTube 1080p, Instagram Post, TikTok Reel, Twitter/X Header); (4) Generate CSS code (aspect-ratio: 16/9; or padding-bottom: 56.25%;) for responsive web design.

Practical Usage Examples

Step-by-Step Instructions

Select a preset ratio (16:9, 4:3, 1:1, 9:16, 21:9) or enter custom ratio values.

Enter either the known Width or known Height in pixels.

The missing dimension is calculated automatically.

Or select a social media preset (YouTube HD, Instagram Square, TikTok Vertical) to prefill standard values.

Copy the calculated pixel dimensions or CSS aspect-ratio snippet.

Core Benefits

Calculates missing width or height for any custom or standard aspect ratio.

Includes social media presets for YouTube, Instagram, TikTok, and Twitter.

Outputs clean CSS code for modern web development (aspect-ratio: W/H).

Simplifies arbitrary pixel dimensions into their irreducible ratio (e.g. 1920×1080 → 16:9).

100% client-side — your image dimensions stay in your browser.

Free, no signup, works offline after first load.

Frequently Asked Questions

To find height when width is known: Height = Width × (Ratio Height / Ratio Width). To find width when height is known: Width = Height × (Ratio Width / Ratio Height). For example, at 16:9 with a width of 1920: 1920 × (9/16) = 1080.

The standard aspect ratio for YouTube on desktop is 16:9 (e.g. 1920×1080 HD or 3840×2160 4K). For YouTube Shorts, the standard ratio is 9:16 vertical (1080×1920).

Instagram feed posts support 1:1 square (1080×1080), 4:5 portrait (1080×1350), and 1.91:1 landscape (1080×566). Instagram Reels and Stories use 9:16 vertical (1080×1920).

Divide both the width and height by their Greatest Common Divisor (GCD). For 1920 and 1080, the GCD is 120. 1920/120 = 16, 1080/120 = 9, yielding 16:9.

Modern CSS supports the aspect-ratio property: aspect-ratio: 16 / 9;. For legacy browser support, use the padding hack: padding-bottom: 56.25%; (where 9/16 = 0.5625).

Related tools

View all tools