
Aspect Ratio Calculator
Calculate, resize, and compare image or video aspect ratios. Get CSS output instantly.
Last reviewed: April 2026New to this tool? Click here for instructions
How to Use the Aspect Ratio Calculator
The Aspect Ratio Calculator is a free online tool that helps you calculate, resize, and compare aspect ratios. To use it, simply enter the width and height of an image or video, and the calculator will provide the simplified aspect ratio, orientation, CSS value, and megapixel count. You can also use the Resize mode to calculate missing dimensions when you know one dimension and the aspect ratio. Enter the width and height of an image or video. The calculator will provide the simplified aspect ratio, orientation, CSS value, and megapixel count. Use the Resize mode to calculate missing dimensions.
When to Use the Tool in Real Workflows
The Aspect Ratio Calculator is ideal for web and graphic designers who need to maintain the correct aspect ratio for images, videos, and containers. It's also useful for developers who need to ensure that their responsive layouts are correctly maintaining aspect ratios. Additionally, it's helpful for anyone who needs to convert dimensions or compare aspect ratios for various projects.
How It Works
The Aspect Ratio Calculator uses a simple formula to calculate the aspect ratio. The formula is the width divided by the height. The calculator then simplifies the ratio to its lowest terms, providing a more readable format. The tool also provides the CSS aspect-ratio property, which can be directly copied into your stylesheet to maintain the correct aspect ratio.
Tips, Edge Cases, or Limitations
When using the Aspect Ratio Calculator, make sure to enter the dimensions in pixels. The calculator does not support fractional dimensions. Additionally, the tool assumes that the aspect ratio is a whole number ratio. If you need to work with non-whole number ratios, you may need to manually simplify the ratio before entering it into the calculator.
Frequently Asked Questions
Quick reference
| Aspect Ratio | Width | Height | Common Use |
|---|---|---|---|
| 16:9 | 1600 | 900 | HDTV, gaming monitors |
| 4:3 | 1280 | 768 | Older TVs, projectors |
| 21:9 | 2100 | 900 | Cinema displays, ultrawide monitors |
| 1:1 | 1024 | 1024 | Square images, social media posts |
| 3:2 | 1920 | 1280 | Photography, some cameras |
| 18:16 | 1800 | 1600 | Smartphone screens, vertical video |
Example walk-through
Worked example: step-by-step
Step 1. Navigate to the Aspect Ratio Calculator webpage and locate the input fields for width and height measurements.
Step 2. Enter the desired dimensions (e.g., width: 1920, height: 1080) into the respective fields.
Step 3. Click the "Calculate" button to process the input, which will simplify the ratio by dividing both values by their greatest common divisor (GCD).
Step 4. Review the output display showing the simplified aspect ratio (e.g., 16:9) and optional adjustments for target ratios like 4:3 or 1:1.
// Sample input
width = 1920
height = 1080
Step by step, the tool computes GCD(1920, 1080) = 120, then divides both values to produce the final ratio.
// Expected output
Simplified Aspect Ratio: 16:9