Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

Aspect Ratio Calculator

Enter a resolution to get its simplified aspect ratio, or start from a ratio and one side to get the missing dimension. Knows the common ratios like 16:9, 4:3 and 21:9 and shows how close your size is to each.

Everything runs locally in your browser. Your data never leaves your device.

Mode

Turn a resolution into its simplified ratio, or lock a ratio and solve the missing side.

Tip: paste a whole resolution like 1920x1080, 1920×1080 or 1920,1080 into either field.

1920 × 1080 px simplifies to

16:91.778:1widescreen
OrientationlandscapeMegapixels2.1 MP
1920 × 1080 px drawn to scale

Against the common ratios

Every common ratio, sorted by how close your size comes. Wider means your size is more stretched than the ratio.

RatioNameDecimalDeviation
16:9widescreen1.778Exact match
5:31.6676.7% wider
16:101.611.1% wider
2:1univisium211.1% narrower
3:2classic photo1.518.5% wider
21:9ultrawide2.33323.8% narrower
4:3classic TV1.33333.3% wider
5:41.2542.2% wider
32:9super ultrawide3.55650.0% narrower
1:1square177.8% wider

Standard resolutions

The common 16:9 sizes. The true ratio column shows each size's exact simplified ratio.

NameResolutionMegapixelsTrue ratio
nHD 360p640 × 360 px0.23 MP16:9
HD 720p1280 × 720 px0.92 MP16:9
Full HD 1080p1920 × 1080 px2.1 MP16:9
QHD 1440p2560 × 1440 px3.7 MP16:9
4K UHD3840 × 2160 px8.3 MP16:9
5K5120 × 2880 px14.7 MP16:9
8K UHD7680 × 4320 px33.2 MP16:9

Next steps

Keep going. These tools open with your result loaded in.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more, each with its own copy button.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

Convert between scientific notation and full numbers as you type. Reads 1.23e5, 1.23 × 10^5 and plain numbers, shows the value written out, in normalized scientific notation and in engineering notation, and can round to any number of significant digits.

About the Aspect Ratio Calculator

This tool works out aspect ratios in both directions. Type or paste a resolution like 1920x1080 and it reduces the numbers to their simplest ratio, 16:9 in that case, along with the decimal form (1.778:1), the orientation and the megapixels, and draws the shape to scale so you can see what the ratio looks like. Pasted sizes are parsed in the common spellings, including 1920×1080, 1920 1080 and 1920,1080.

The other direction locks a ratio and solves the missing side. Pick 16:9, 4:3, 21:9 or any of the other common ratios, or enter your own terms, type the width or the height, and the tool calculates the other one. Results can be rounded to steps of 2, 4, 8 or 16 pixels, which video encoders and image pipelines often require. A comparison table shows how close your size sits to every common ratio, and a second table lists the standard resolutions of the matching family, from 720p up to 8K for 16:9.

What you can do

  • Get the aspect ratio of a resolution like 1920x1080 or 3440x1440.
  • Convert an aspect ratio to a decimal like 1.778:1.
  • Calculate the missing width or height for a locked ratio such as 16:9.
  • Scale a resolution while keeping the aspect ratio.
  • Check whether a screen size is exactly 16:9, 4:3 or 21:9, and how far off it is.
  • Round a calculated dimension to even numbers or multiples of 8 or 16 for video encoding.
  • Look up the standard 16:9, 4:3, 3:2 and ultrawide resolutions with their megapixels.

How to use the Aspect Ratio Calculator

  1. 1Pick a mode: simplify a resolution, or find a missing side.
  2. 2To simplify, type the width and height or paste a whole resolution into either field.
  3. 3To find a side, lock a ratio, choose landscape or portrait, type the side you know and pick a rounding step.
  4. 4Read the result, the shape preview and the tables below, and copy the ratio or resolution you need.

Why a simplified ratio can look odd

The simplified ratio is the exact mathematical reduction, so a size that is one pixel off a clean ratio reduces to something long like 1921:1080 instead of 16:9. That is not a bug, it is the honest answer. The comparison table is there for exactly this case: it shows the nearest common ratio and how far off your size is, in percent, so you can tell a true 16:9 apart from an almost 16:9.

Ultrawide monitors are the classic example. A 3440x1440 display is marketed as 21:9, but its exact ratio is 43:18, about 2.4% wider than a true 21:9. The standard resolutions table shows each size's true ratio next to its family so these marketing labels never surprise you.

Rounding for video and images

Most video codecs require even dimensions, and some pipelines want multiples of 8 or 16. The rounding options snap the calculated side to the step you pick, and when rounding changes the number, the tool tells you how far the real ratio drifts from the one you locked. Choose Exact when you want the raw fraction instead, for example when working in vector units rather than pixels.

Where to go from here

Once you know the target size, the Image Cropper & Resizer cuts an image to a fixed ratio like 16:9 or 1:1 and resizes it to exact pixel dimensions. The Print Size Calculator answers the physical-size side of the same question, how large a resolution prints at a given DPI. To read the resolution and aspect ratio out of a video file, drop it into the Video Inspector.

Create barcodes in dozens of formats, from EAN-13, UPC-A and Code 128 to QR Code, Data Matrix and PDF417. Type the content, tune the size, colors and text options, and download the result as PNG or SVG.

Convert Unix file permissions between checkboxes, octal like 755 and symbolic notation like rwxr-xr-x, all kept in sync as you edit any of them. Covers setuid, setgid and the sticky bit, and shows the matching chmod command ready to copy.

Convert between px, rem, em, percent, pt and viewport units with a configurable root font size. Type into any field and the others update as you go, set the parent font size for em math, and read a conversion table for common sizes.

Turn any image into a complete favicon set: a multi-size favicon.ico, PNG icons in every common size, Apple touch and Android icons, a web manifest and the HTML tags to paste into your page. Download everything as a zip.

Work out an IPv4 or IPv6 network from an address with a prefix or netmask: network and broadcast addresses, usable host range, subnet mask, wildcard mask and address type. Adjust the prefix with a slider, read the binary breakdown, and split the network into smaller subnets.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.