What This Calculator Does
This aspect ratio calculator computes the simplified ratio between width and height dimensions. It also provides a resize tool that lets you enter a new width or height and automatically calculates the other dimension to maintain the same proportions. A visual preview shows the shape of the ratio.
Inputs Explained
- Width (px): The horizontal dimension of your image, video, or screen in pixels.
- Height (px): The vertical dimension in pixels.
- Common Presets: Quick buttons for standard ratios like 16:9, 4:3, 1:1, 9:16, and 21:9.
- New Width / New Height (Resize Tool): Enter one value and the other is calculated to preserve the aspect ratio.
How It Works
The calculator finds the Greatest Common Divisor (GCD) of the width and height using the Euclidean algorithm, then divides both dimensions by the GCD to produce the simplified ratio. For the resize tool, it uses the proportion formula: new height = new width × (original height ÷ original width), and vice versa.
Formulas Used
Simplified Ratio = (Width ÷ GCD) : (Height ÷ GCD)
Decimal Ratio = Width ÷ Height
Resize: New Height = New Width × (Original Height ÷ Original Width)
Resize: New Width = New Height × (Original Width ÷ Original Height)
Aspect Ratio Calculator
Calculate dimensions and simplify ratios.
Ratio
Step-by-Step Example
Width: 1920 px
Height: 1080 px
Step 1: Find GCD of 1920 and 1080. GCD(1920, 1080) = 120.
Step 2: Divide both by GCD. 1920 ÷ 120 = 16, 1080 ÷ 120 = 9.
Simplified Ratio: 16:9
Decimal: 1920 ÷ 1080 = 1.778
Total Pixels: 1920 × 1080 = 2,073,600 (approximately 2 megapixels).
Resize Example: To resize to width 1280, new height = 1280 × (1080 ÷ 1920) = 720 px.
Use Cases
- Video production: Ensure footage matches target formats like 16:9 (YouTube, TV), 9:16 (TikTok, Instagram Reels), or 21:9 (cinema).
- Web design: Maintain image proportions when creating responsive layouts or hero banners.
- Photography: Crop images to standard print sizes (4:3 for 8×6, 3:2 for 6×4) without distortion.
- Social media: Resize images to platform-specific dimensions while preserving the aspect ratio.
- Display shopping: Compare monitor and TV aspect ratios (16:9 vs. 21:9 ultrawide) before purchasing.
Assumptions and Limitations
- The calculator works with integer pixel dimensions. Sub-pixel values are rounded to the nearest whole number.
- The GCD simplification may produce large numbers for non-standard dimensions (e.g., 1366:768 simplifies to 683:384, not a clean ratio).
- The resize tool maintains exact mathematical proportions. Actual rendered sizes may differ due to display scaling or CSS constraints.
- Only width and height are considered. The calculator does not account for pixel aspect ratio (PAR) used in some video standards.
Frequently Asked Questions
Sources and References
- ITU-R BT.709 – HDTV Standard — International standard defining the 16:9 aspect ratio for high-definition television.
- SMPTE – Society of Motion Picture and Television Engineers — Professional body establishing standards for digital cinema aspect ratios and video formats.
- W3C CSS Images Module Level 3 – Image sizing — Web standard covering how images are sized and displayed in browsers.
- Euclidean Algorithm – Khan Academy — Educational reference for the GCD algorithm used to simplify ratios.
- Schema.org WebPage Specification — Structured data standard used for the page metadata.