Aspect Ratio Calculator

Calculate aspect ratios from dimensions or find missing width/height from a target ratio.

aspect_ratioAspect Ratio Calculator
tune

Settings

Mode
Width (px)
Height (px)
analytics

Results

aspect_ratio

Enter dimensions or a ratio to see results

info

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.

star

Key Features

check_circle

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.

check_circle

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.

check_circle

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.

check_circle

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.

check_circle

Proportional visual preview

A scaled rectangle renders instantly to let you sanity-check the shape before applying it to your design or export settings.

check_circle

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.

help

How to Use

01

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.

02

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.

03

View Results

The calculator instantly displays the simplified aspect ratio, decimal ratio, dimensions, and a proportional visual preview.

04

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.

code_blocks

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 x Height (px)
Width:  2560
Height: 1440
Calculated results
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
lightbulb

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.

quiz

Frequently Asked Questions

What is an aspect ratio? expand_more
An aspect ratio is the proportional relationship between the width and height of a rectangle. It is expressed as two numbers separated by a colon, such as 16:9. A 16:9 ratio means the width is 16 units for every 9 units of height, regardless of the actual size.
How is the aspect ratio calculated from dimensions? expand_more
The calculator finds the greatest common divisor (GCD) of the width and height, then divides both values by the GCD. For example, 1920 and 1080 have a GCD of 120, so 1920/120 = 16 and 1080/120 = 9, giving a 16:9 ratio.
What is the most common aspect ratio for video? expand_more
16:9 is the most widely used aspect ratio for video content, including YouTube, Netflix, and broadcast television. It is the standard for Full HD (1920x1080), QHD (2560x1440), and 4K UHD (3840x2160) resolutions.
How do I calculate a missing dimension from a ratio? expand_more
Switch to "Calculate Dimension" mode, enter or select your target ratio (e.g., 16:9), choose whether you know the width or height, and enter that value. The calculator multiplies by the ratio to find the other dimension. For example, with a 16:9 ratio and width of 1920, the height is 1920 x (9/16) = 1080.
Is my data secure when using this calculator? expand_more
Yes. All calculations happen locally in your browser using JavaScript. No dimensions, ratios, or other data are sent to any server. The tool works fully offline once loaded.
How is this different from a percentage calculator or a general-purpose calculator? expand_more
A general percentage or arithmetic calculator cannot simplify a ratio, identify standard presets, or calculate a proportional dimension from a ratio. This tool is purpose-built for rectangular proportions: it reduces pairs of numbers to their lowest terms, matches the result to named standards like 16:9 and 1:1, and can reverse-calculate missing sides — none of which a generic calculator provides.
What pixel units does the calculator accept? expand_more
The inputs accept any positive number. The tool treats them as abstract units rather than enforcing a specific unit, so you can enter pixels, millimetres, points, or any consistent unit as long as both sides use the same unit.
Can I use this to find the aspect ratio of a non-standard or custom ratio? expand_more
Yes. In Dimension mode you can type any custom ratio values in the Ratio Width and Ratio Height fields — you are not limited to the six preset buttons. The tool will calculate the proportional dimension and show the decimal ratio even if the ratio does not match a named standard.
Why does the tool show a decimal ratio alongside the simplified integer ratio? expand_more
Some workflows, such as CSS aspect-ratio calculations or camera sensor comparisons, use the ratio as a single floating-point number rather than two integers. The decimal value (e.g., 1.7778 for 16:9) makes it straightforward to copy into those contexts without manual division.
What are the common resolutions shown for 16:9? expand_more
When your dimensions simplify to 16:9, the reference table lists 1280x720 (720p HD), 1920x1080 (1080p Full HD), 2560x1440 (1440p QHD), and 3840x2160 (4K UHD). Similar tables appear for 4:3, 1:1, 21:9, 3:2, and 9:16 when those ratios are detected.
What does 9:16 represent and when would I use it? expand_more
9:16 is the vertical counterpart of the standard 16:9 widescreen ratio. It is the native proportion of smartphone screens held in portrait orientation, and it is the required format for Instagram Reels, TikTok videos, and YouTube Shorts. Common resolutions include 1080x1920 and 1440x2560.