Aspect Ratio Calculator

Calculate aspect ratios from width and height. Lock aspect ratio to find missing dimensions. Common presets for HD, Full HD, 4K, Instagram, YouTube, Twitter, and Facebook. Calculate diagonal size and pixel density (PPI).

Dimensions
Visual Preview
Enter dimensions
Pixel Density (PPI)
Common Presets

Features

📏

Aspect Ratio Detection

Enter width and height to automatically calculate the simplified aspect ratio. Supports any dimension values and simplifies to the lowest common denominator.

🔒

Lock & Calculate

Lock the aspect ratio and enter one dimension to automatically calculate the other. Perfect for resizing images while maintaining proportions.

📸

Visual Preview

See a scaled visual representation of your aspect ratio. Dimensions are displayed on the preview rectangle for easy reference.

💾

Common Presets

Quick access to HD, Full HD, 4K, Instagram, YouTube, Twitter, Facebook, and other common aspect ratios and resolutions. One-click to apply.

About Aspect Ratios and Screen Resolutions

Aspect ratio is a fundamental concept in digital media, photography, videography, and display technology. It defines the proportional relationship between the width and height of an image, screen, or video frame. Understanding aspect ratios is essential for creating content that displays correctly across different devices and platforms, from smartphones to cinema screens.

Common Aspect Ratios

The most common aspect ratios today are 16:9 (widescreen), 4:3 (standard), 21:9 (ultrawide), 1:1 (square), and 9:16 (vertical). 16:9 is the modern standard for televisions, computer monitors, and YouTube videos. 4:3 was the traditional TV format. 21:9 is used for ultrawide monitors and cinematic content. 1:1 is popular for Instagram posts. 9:16 is the vertical format for mobile-first content like Instagram Stories, TikTok, and YouTube Shorts.

How This Tool Works

Enter the width and height in pixels to see the simplified aspect ratio. The tool automatically calculates the greatest common divisor to reduce the ratio to its simplest form. For example, 1920x1080 becomes 16:9. Click the lock button to lock the aspect ratio, then enter one dimension to automatically calculate the other. The visual preview shows a scaled representation of your dimensions. The statistics section displays diagonal size (using the Pythagorean theorem), total pixels, and megapixels. Enter a diagonal size in inches to calculate the pixel density (PPI) of a display.

Common Use Cases

Frequently Asked Questions

What is an aspect ratio?
An aspect ratio is the proportional relationship between width and height of an image, screen, or video. It is expressed as two numbers separated by a colon (e.g., 16:9, 4:3, 1:1). The first number represents the width, and the second represents the height. For example, 16:9 means for every 16 units of width, there are 9 units of height. Aspect ratios are fundamental in photography, videography, web design, and display technology.
What is the difference between 16:9 and 4:3 aspect ratios?
16:9 (also called widescreen) is the modern standard for TVs, computer monitors, and most online video. It provides a wider horizontal field of view and is ideal for cinematic content. 4:3 (also called standard or fullscreen) was the traditional TV and computer monitor format before widescreen became popular. It's more square-shaped and was used for older television broadcasts and early computer displays. 16:9 is approximately 1.78:1, while 4:3 is 1.33:1.
How do I calculate the aspect ratio from width and height?
To calculate aspect ratio, divide both the width and height by their greatest common divisor (GCD). For example, if you have a 1920x1080 image: GCD(1920, 1080) = 120. Divide both: 1920÷120 = 16, 1080÷120 = 9. The aspect ratio is 16:9. This tool automatically calculates the simplified aspect ratio from any width and height you enter.
What aspect ratio should I use for Instagram?
Instagram supports multiple aspect ratios depending on the post type. Instagram feed posts work best at 1:1 (square, 1080x1080), 4:5 (portrait, 1080x1350), or 16:9 (landscape, 1080x607). Instagram Stories and Reels use 9:16 (vertical, 1080x1920). Instagram profile pictures are 1:1. This tool includes presets for all common Instagram formats.
How do I calculate the missing dimension when aspect ratio is locked?
When you lock an aspect ratio (e.g., 16:9), you can calculate the missing dimension using the formula: if you have width, height = width × (ratio height / ratio width). For example, if width is 1920 and ratio is 16:9, height = 1920 × (9/16) = 1080. This tool automatically calculates the missing dimension when you lock the aspect ratio and enter one value.
What is pixel density (PPI)?
PPI (Pixels Per Inch) measures how many pixels fit into one inch of a display or printed image. Higher PPI means sharper, more detailed images. To calculate PPI, use the formula: PPI = sqrt(width² + height²) / diagonal. For example, a 1920x1080 display with a 24-inch diagonal has 92 PPI. Retina displays typically have 200+ PPI. This tool calculates PPI when you provide dimensions and diagonal size.
What is the best aspect ratio for YouTube videos?
YouTube's standard player uses 16:9 aspect ratio. The recommended resolution is 1920x1080 (Full HD) or 3840x2160 (4K). YouTube Shorts uses 9:16 (vertical) format, ideally 1080x1920. If you upload videos in other aspect ratios, YouTube will add black bars (letterboxing or pillarboxing) to fit the 16:9 player. This tool includes YouTube thumbnail preset (1280x720, 16:9).
How do I calculate diagonal screen size from width and height?
Use the Pythagorean theorem to calculate diagonal size: diagonal = sqrt(width² + height²). For example, if a screen is 1920 pixels wide and 1080 pixels tall, diagonal = sqrt(1920² + 1080²) = sqrt(4,953,600) = 2,202 pixels. This tool calculates the diagonal automatically. For physical screen size in inches, use the same formula with inch measurements instead of pixels.

Explore More Developer Tools

Check out our other free tools for designers and developers. Generate color palettes, compress images, create QR codes, and more.

Image Compressor →