Aspect Ratio Calculator
Calculate aspect ratios from dimensions or find missing width/height from a target ratio.
Settings
Results
Enter dimensions or a ratio to see results
About Aspect Ratio Calculator
The Aspect Ratio Calculator solves two related problems in a single tool. In "Calculate Ratio" mode, you enter a pixel width and pixel height and the calculator reduces them to their simplest integer form using the greatest common divisor — so 1920 x 1080 becomes 16:9, and 1200 x 800 becomes 3:2. In "Calculate Dimension" mode, you supply a known ratio (from six built-in presets or a custom pair) plus one side, and the tool multiplies by the ratio to return the missing dimension instantly.
Aspect ratios show up wherever rectangular media is constrained to a fixed shape: video exports, social media uploads, CSS containers, responsive image breakpoints, print layouts, and hardware display specs. Getting the ratio wrong means stretched thumbnails, letterboxed exports, or cropped subjects. Because the tool works in both directions — ratio from dimensions, or dimension from ratio — it covers the full range of daily resizing tasks without requiring you to reach for a spreadsheet or mental arithmetic.
Every calculation runs entirely inside your browser with plain JavaScript. No pixel counts, no file contents, and no dimensions are transmitted to any server. The tool works offline once the page has loaded, and there are no usage limits, no account requirements, and no cost.
Key Features
Two-way calculation
Either derive the ratio from a pair of pixel dimensions, or calculate a missing width or height from a known ratio and a single side — both directions in one tool.
GCD-based simplification
Ratios are reduced to their lowest integer form using the Euclidean algorithm, so 2560x1440 correctly yields 16:9 instead of 256:144.
Six built-in ratio presets
One-click presets for 16:9, 4:3, 1:1, 21:9, 3:2, and 9:16 cover the most common video, photo, and social formats without typing.
Common resolution reference table
When your ratio matches a standard (16:9, 4:3, 1:1, 21:9, 3:2, 9:16), the tool surfaces a table of canonical resolutions such as 720p, 1080p, QHD, and 4K UHD for quick cross-reference.
Proportional visual preview
A scaled rectangle renders instantly to let you sanity-check the shape before applying it to your design or export settings.
Decimal ratio output
Alongside the simplified integer ratio, a four-decimal floating-point value is shown — useful for CSS aspect-ratio properties and camera sensor comparisons.
How to Use
Choose a Mode
Select "Calculate Ratio" to find the ratio from width and height, or "Calculate Dimension" to find a missing dimension from a known ratio.
Enter Values
In Ratio mode, enter the width and height in pixels. In Dimension mode, pick a preset ratio or type custom ratio values, then enter the known width or height.
View Results
The calculator instantly displays the simplified aspect ratio, decimal ratio, dimensions, and a proportional visual preview.
Check Common Resolutions
If your ratio matches a standard (16:9, 4:3, etc.), a table of common resolutions for that ratio is shown for quick reference.
Example
Enter a width of 2560 and height of 1440. The GCD of 2560 and 1440 is 160, so both are divided down to 16 and 9. The tool returns the simplified ratio, the decimal value, and a table of common QHD-family resolutions.
Width: 2560
Height: 1440 Aspect Ratio: 16:9
Decimal Ratio: 1.7778
Dimensions: 2560 x 1440
Common 16:9 Resolutions
-----------------------
1280 x 720 — 720p HD
1920 x 1080 — 1080p Full HD
2560 x 1440 — 1440p QHD
3840 x 2160 — 4K UHD Common Use Cases
- arrow_circle_right
Resizing video exports without distortion
Video editors need the target canvas to match the original shoot ratio exactly. Enter the source clip dimensions to confirm the ratio, then switch to Dimension mode to derive a safe export size at a different resolution.
- arrow_circle_right
Cropping images to social media specs
Instagram feed posts require 1:1 or 4:5; YouTube thumbnails are 16:9; LinkedIn banners are roughly 8:1. Enter a photo's native dimensions to see its current ratio, then use Dimension mode to find the largest crop that fits the target format without stretching.
- arrow_circle_right
Setting CSS aspect-ratio on responsive containers
The CSS aspect-ratio property accepts a fraction (e.g., 16 / 9). When a designer hands off a mockup with a component measured in arbitrary pixels, this tool reduces those pixels to the correct integer pair for the stylesheet.
- arrow_circle_right
Verifying hardware display specs
Monitor and TV specs often list resolution without the ratio name. Enter the resolution to confirm whether it is true 16:9, ultrawide 21:9, or a non-standard panel, and cross-reference against the common resolution table.
- arrow_circle_right
Scaling print and slide layouts
Presentation slides (16:9 for modern decks, 4:3 for legacy projectors) and print artwork both require consistent proportions across sizes. Enter the intended output dimensions to confirm the ratio before scaling up artwork.