Skip to main content

Aspect Ratio Calculator

Solves the missing side of an aspect ratio: height from width, width from height, the reduced ratio from two dimensions, or both from a diagonal. Non-integer ratios such as 1.85:1 reduce through continued fractions rather than a plain greatest common divisor, computed pixel sizes snap to multiples of 2, 4, 8, or 16, and non-square pixel aspect ratios resolve storage dimensions into display dimensions.

Runs entirely in your browser

This tool sends nothing over the network. Everything you enter is processed on your device and never reaches our servers.

Design
Photography
Web
Loading the tool
Reference

Documentation

An aspect ratio calculator relates a proportion, written as two numbers such as 16:9, to the real dimensions of a frame, screen, sensor, or print. The ratio itself carries no size. 16:9 describes 1280 by 720 and 3840 by 2160 equally well, so size only enters once one measurement is known. Everything on this page derives from a single quotient, R = ratio width divided by ratio height, which for 16:9 is 1.7778.

The ratio pair sets the proportion and accepts either whole-number film and screen conventions (16 and 9) or the decimal convention used in cinema (1.85 and 1). Both reach the same R. Width, height, and diagonal are the size measurements; only the ones the chosen solve mode treats as known are read, and the solved measurement is written back into its field so the four numbers always agree. The unit affects labels, the area calculation, and the megapixel figure, which is reported only when the unit is pixels because megapixels are a pixel count rather than a physical measure.

Four solve modes cover the four quantities that are usually unknown. Height from width applies H = W / R. Width from height applies W = H x R. Aspect ratio from two dimensions applies R = W / H and then reduces W:H to lowest terms. Width and height from a diagonal applies H = D / sqrt(R squared + 1) followed by W = R x H, which is how a display advertised only by its diagonal resolves into real width and height. Diagonal is always reported back as D = sqrt(W squared + H squared), recomputed from the final rounded dimensions rather than carried over from the input.

Pixel dimensions are not continuous, and video encoders align to macroblocks, so computed sizes can round to whole numbers or to multiples of 2, 4, 8, or 16. Rounding moves the true proportion, so the frame detail reports the ratio the rounded numbers actually produce next to the target. Reduction handles two cases: when both dimensions are whole numbers the ratio reduces by greatest common divisor, and when either is fractional the ratio reduces through a continued-fraction approximation capped at a denominator of 1000, which turns 1.85 into 37:20 instead of an unreadable fraction. Nearest standard ratio compares R against a table of published standards and reports the closest one with its percentage difference; a difference under 0.05 percent is reported as exact.

Pixel aspect ratio separates storage dimensions from display dimensions. Standard-definition and anamorphic formats store non-square pixels, so a 720 by 480 NTSC DV frame with a 0.9091 pixel aspect ratio displays at 4:3 rather than the 3:2 its raw pixel count suggests. Display aspect ratio is computed as DAR = (W x PAR) / H. Fitting one proportion inside another uses scale = min(target width / W, target height / H) for letterbox and pillarbox, or the maximum of the same two quotients for fill and crop; bar thickness is half the leftover dimension on each side, and crop is half the overflow on each side. Numeric fields accept decimals, fractions such as 3/4, mixed numbers such as 5 1/16 or 1-3/8, and scientific notation such as 1.5e3. Settings holds the rounding rule, decimal precision, the pixel aspect ratio table, and a step-by-step formula view. A resolution preset list fills both dimension fields and the ratio pair from a named standard, and every input travels as a URL query parameter so a result can be shared or bookmarked.

A 16:9 timeline at 1920 wide gives R = 16 / 9 = 1.7778, so H = 1920 / 1.7778 = 1080 and D = sqrt(1920 squared + 1080 squared) = sqrt(4,852,800) = 2202.9072 pixels. Placing that frame inside a 1024 by 768 window in letterbox mode gives scale = min(1024 / 1920, 768 / 1080) = min(0.5333, 0.7111) = 0.5333, so the picture lands at 1024 by 576 with 96 pixel bars above and below.

Aspect ratio arithmetic shows up wherever a picture has to move between frames of different shapes. The same quotient governs a camera sensor, an editing timeline, a delivery specification, a print size, and a phone screen, which is why one calculation answers questions that look unrelated on the surface.

  • Video editing: Confirm that a 2.39:1 anamorphic sequence delivered at 3840 wide needs a 1607 pixel height, then round to 1608 so the encoder sees a multiple of 8 and note the 0.06 percent proportion shift that rounding introduces.
  • Broadcast and streaming delivery: Check a 1920 by 1080 master against a 1.85:1 flat specification, see that the nearest standard is 16:9 at a 4.05 percent difference, and size the letterbox bars needed to place flat content inside a 16:9 container.
  • Legacy and anamorphic footage: Resolve a 720 by 480 NTSC DV clip with a 0.9091 pixel aspect ratio to its 4:3 display shape, or a 1440 by 1080 HDV frame with a 1.3333 pixel aspect ratio to its 16:9 display shape, before conforming it to a square-pixel timeline.
  • Photography and print: Take a 6000 by 4000 full-frame file at 3:2 and find the 5:4 crop an eight by ten print requires, or enter a 7:5 ratio with a 7 inch width to get the exact 5 inch height and 8.6023 inch diagonal.
  • Web and interface design: Generate a ladder of widths at 16:9 for responsive image sources, so 320, 640, 1280, and 1920 pixel widths all land on even heights that avoid half-pixel rendering seams.
  • Display and hardware buying: Convert a 27 inch diagonal at 16:9 into 23.5278 inches wide by 13.2344 inches tall, then compare that footprint against a 34 inch 21:9 ultrawide before committing desk space.
  • Social media publishing: Move one master image into a 1:1 square post, a 4:5 portrait post, a 9:16 story, and a 1.91:1 link preview, reading the crop each target demands from the fill-and-crop mode.
  • Game and real-time rendering: Size a render target for a 32:9 super ultrawide at 5120 by 1440, then verify that the same scene at 16:9 needs 2560 by 1440 to keep vertical field of view constant.
  • Digital signage: Fit 16:9 source content onto a 3:1 wall panel, read the pillarbox thickness on each side, and decide between bars and a crop that discards 41 percent of the frame area.
  • Presentation and projection: Match slide dimensions to a 16:10 projector rather than assuming 16:9, which otherwise leaves unused bands on a 1920 by 1200 surface.
  • Thumbnail and artwork pipelines: Derive every downstream size from one ratio so a 1280 by 720 thumbnail, a 1920 by 1080 hero image, and a 3840 by 2160 poster frame all reduce to the same 16:9 proportion.
Inputs, outputs, and what the Aspect Ratio Calculator computes

What the Aspect Ratio Calculator asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.

Inputs

  • Ratio preset · default: 16:9 HD widescreen
  • Ratio width (text input) · default: 16
  • Ratio height (text input) · default: 9
  • Solve for height / Solve for width / Solve for aspect ratio / Solve for width and height from the diagonal · default: Solve for height
  • Resolution preset · default: Custom
  • Width (text input) · default: 1920
  • Height (text input) · default: 1080
  • Diagonal (text input) · default: 2202.9072
  • Unit · default: Pixels
  • Round computed dimensions · default: To whole numbers
  • Decimal places · default: 4
  • Pixel aspect ratio · default: Square pixels (1.0)
  • Custom pixel aspect ratio (text input) · default: 1
  • Show step-by-step formula · default: off
  • Target width (text input) · default: 1024
  • Target height (text input) · default: 768
  • Fit mode · default: Letterbox or pillarbox (fit inside)

Controls

Calculate · Reset

Example

A 16:9 timeline at 1920 wide gives R = 16 / 9 = 1.7778, so H = 1920 / 1.7778 = 1080 and D = sqrt(1920 squared + 1080 squared) = sqrt(4,852,800) = 2202.9072 pixels.