About this tool
What Is an Aspect Ratio?
An aspect ratio is the proportional relationship between the width and height of an image, video, or screen, expressed as two numbers separated by a colon (e.g., 16:9). It defines the shape of the frame — whether it is wide, square, or tall — without specifying the actual pixel dimensions.
This calculator takes any width × height pair, computes the Greatest Common Divisor (GCD), and divides both dimensions by it to produce the simplified ratio. For example, 1920 ÷ 120 = 16, and 1080 ÷ 120 = 9, giving the familiar 16:9 ratio.
Common Aspect Ratios and Where They Are Used
| Ratio | Decimal | Common Use |
|---|---|---|
| 16:9 | 1.7778 | YouTube, TV, monitors, Full HD, 4K |
| 4:3 | 1.3333 | Older TVs, iPads, presentation slides |
| 1:1 | 1.0000 | Instagram square posts, profile photos |
| 4:5 | 0.8000 | Instagram portrait posts (1080×1350) |
| 9:16 | 0.5625 | Instagram Reels, TikTok, YouTube Shorts |
| 21:9 | 2.3333 | Ultrawide monitors, cinematic films |
| 3:2 | 1.5000 | DSLR photos, MacBook displays |
| 2.39:1 | 2.3900 | Anamorphic cinema (CinemaScope) |
How the GCD Algorithm Works
The Greatest Common Divisor (GCD) is the largest integer that divides both the width and height evenly. This calculator uses the Euclidean algorithm, which repeatedly divides the larger number by the smaller and takes the remainder until the remainder is zero.
Example: GCD(1920, 1080)
- 1920 ÷ 1080 = 1 remainder 840
- 1080 ÷ 840 = 1 remainder 240
- 840 ÷ 240 = 3 remainder 120
- 240 ÷ 120 = 2 remainder 0
- GCD = 120
Dividing: 1920 ÷ 120 = 16, 1080 ÷ 120 = 9 → Ratio: 16:9
Finding Missing Dimensions
The most practical use of this calculator is finding a proportionally correct width or height when you know only one dimension and the aspect ratio.
The formula uses cross-multiplication from the original proportions:
- Finding height: New Height = Target Width × (Original Height ÷ Original Width)
- Finding width: New Width = Target Height × (Original Width ÷ Original Height)
Example: Your source is 1920×1080 (16:9). You need a 1280px wide version:
- New Height = 1280 × (1080 ÷ 1920) = 1280 × 0.5625 = 720px
- Result: 1280 × 720
Preventing Image Distortion in Web Design
When images are displayed without maintaining their aspect ratio, they appear stretched or squished. This happens when CSS forces both a fixed width and height that do not match the image's natural proportions.
To prevent distortion:
- Use the CSS
aspect-ratioproperty:aspect-ratio: 16 / 9; - Use
object-fit: cover;orobject-fit: contain;to control how images fill their container - Set explicit
widthandheightattributes on<img>tags to prevent Cumulative Layout Shift (CLS) - Use this calculator to determine the correct height for any given width
Practical Usage Examples
YouTube Thumbnail Resize
Source: 4000×3000 (4:3). Need 16:9 YouTube dimensions.
Set original to 16:9 base (1920×1080), target width 1280 → computed height: 720px. Instagram Reel Dimensions
Need 9:16 vertical video at 1080px wide.
Set original to 9:16 (1080×1920). Ratio confirmed. Full HD vertical format. Step-by-Step Instructions
Step 1: Enter Original Dimensions. Type the width and height in pixels of your source image or video. For example, 1920 × 1080 for standard Full HD content.
Step 2: Check the Simplified Ratio. The calculator uses the Greatest Common Divisor (GCD) algorithm to reduce your dimensions to the simplest ratio. 1920 × 1080 simplifies to 16:9.
Step 3: Enter One Target Dimension. To find a proportionally correct missing dimension, enter either a target width OR a target height — not both. The calculator solves for the unknown value.
Step 4: Read the Computed Dimension. The missing dimension is calculated using cross-multiplication: New Height = Target Width × (Original Height ÷ Original Width). Results are rounded to the nearest whole pixel.
Step 5: Use the Results. Apply the calculated dimensions in your CSS, video editor, image editor, or social media upload settings to maintain perfect proportions.
Core Benefits
GCD-Based Ratio Simplification: Uses the Euclidean algorithm to compute the Greatest Common Divisor and reduce any resolution to its simplest ratio form.
No File Upload Required: This is a pure math calculator — it processes pixel numbers, not image files. Your creative assets stay on your device.
Pixel-Perfect Rounding: Results are rounded to the nearest integer using Math.round(), preventing sub-pixel rendering issues that cause blurry edges in browsers.
Cross-Platform Dimensions: Calculate dimensions for YouTube (16:9), Instagram (4:5, 1:1, 9:16), TikTok (9:16), cinema (21:9), and any custom ratio.
Instant Calculation: Results update immediately without page reloads or server requests. All math runs in your browser.
Frequently Asked Questions
The aspect ratio of 1920×1080 is 16:9. The GCD of 1920 and 1080 is 120. Dividing both by 120 gives 16:9, which is the standard widescreen format used for Full HD and 4K content on YouTube, Netflix, and modern monitors.
Divide both the width and height by their Greatest Common Divisor (GCD). For example, for 2560×1440: GCD is 320, so 2560÷320 = 8 and 1440÷320 = 4.5. Since aspect ratios use integers, this simplifies to 16:9 (multiply both by 2).
Instagram supports multiple ratios: 1:1 (1080×1080) for square feed posts, 4:5 (1080×1350) for portrait feed posts, and 9:16 (1080×1920) for Stories and Reels. Square and portrait formats are most common for feed content.
Distortion occurs when you force an image into dimensions that do not match its natural aspect ratio. For example, placing a 16:9 image into a 1:1 container without using object-fit will stretch it. Use this calculator to find the correct proportional dimensions.
16:9 is wider and shorter (widescreen), while 4:3 is closer to square (standard). 16:9 is the modern standard for HD content. 4:3 was the standard for older CRT televisions and is still used for iPad screens and presentation slides.
Enter your original width and height to establish the ratio, then enter only the target width. The calculator computes: Target Height = Target Width × (Original Height ÷ Original Width). The result is rounded to the nearest pixel.
The decimal is the width divided by the height. For 16:9, it is 16÷9 = 1.7778. This decimal is useful in CSS (aspect-ratio property) and in programming where you need a single number to represent the ratio rather than two integers.
21:9 (decimal: 2.333) is used by ultrawide monitors (typically 2560×1080 or 3440×1440) and cinematic films. It provides more horizontal screen space than 16:9, which is beneficial for video editing timelines, spreadsheets, and immersive gaming.
No. This is a pure math calculator that computes pixel dimensions. It does not process, resize, or modify image files. If you scale a 200×200 image to 2000×2000 based on the ratio, the proportions will be correct but the image will appear pixelated.
No. This calculator does not accept image uploads. It only processes the numeric width and height values you type. All calculations run in your browser using JavaScript. No data is transmitted anywhere.