Solved.tools โ€” Free Online Calculators & Tools

We use cookies for analytics and advertising. Learn more about our cookie policy

Aspect Ratio Calculator

Last updated: 11 August 2026

Reviewed by Gavin ยท Research and drafting assisted by AI

๐Ÿ“ Aspect Ratio Calculator

Maintain an exact aspect ratio when resizing images, video, or designs. Pick a mode, enter your dimensions, and the calculator enforces the ratio to the pixel.

Original dimensions

Lock ratio, scale to fit

Keep the original aspect ratio intact. Set a new width (the height is computed) or vice versa.

Result

New W1,280 px
New H720 px (exact: 720.0000)
FormulanewHeight = 1280 ร— (1080 / 1920) = 720.0000
Decimal ratio1.777778
GCD-reduced ratio16:9 (GCD = 120)

Preset ratios

Click a preset to load the (W, H) into the custom-ratio inputs below. The effective ratio (used for the diagonal helper) is the original dimensions if both are positive, otherwise the custom inputs.

Diagonal โ†’ physical size (optional)

Given a screen diagonal in inches and the effective ratio, compute the physical width ร— height in centimetres (1 inch = 2.54 cm).

Verification examples (4 hand-checked spot tests)
1920ร—1080 โ†’ scale to 1280 wide
  1. ratio = 1080 / 1920 = 0.5625
  2. newH = 1280 ร— 0.5625 = 720.0
  3. GCD(1920, 1080) = 120 โ†’ 1920/120 = 16, 1080/120 = 9 โ†’ 16:9 โœ“
1080ร—1920 โ†’ lock ratio, new W = 1080
  1. ratio = 1920 / 1080 = 1.7777โ€ฆ
  2. newH = 1080 ร— (1920 / 1080) = 1920.0
  3. GCD(1080, 1920) = 120 โ†’ 9:16 โœ“
4032ร—3024 โ†’ scale to 1920 wide
  1. ratio = 3024 / 4032 = 0.75
  2. newH = 1920 ร— 0.75 = 1440.0
  3. GCD(4032, 3024) = 1008 โ†’ 4032/1008 = 4, 3024/1008 = 3 โ†’ 4:3 โœ“
1920ร—1080 โ†’ resize to fit 1000 wide
  1. original ratio = 1920 / 1080 = 1.7777โ€ฆ
  2. box ratio = 1000 / 1000 = 1.0 (square box)
  3. original is wider โ†’ constrain by width: newW = 1000, newH = 1000 ร— 0.5625 = 562.5
  4. Note: 562.5 is NOT truncated to 562 โ€” the float is preserved end-to-end.
Was this helpful?


Aspect Ratio Calculator

An aspect ratio describes the proportional relationship between an image's width and its height. It is written as W:H (e.g. 16:9) or as a single decimal (e.g. 1.778), and it is the single most important constraint when scaling images, video, presentation slides, or UI layouts without distortion. When you resize a 1920ร—1080 photograph to a thumbnail, the ratio of 1.778 must be preserved, otherwise the photo looks stretched (horizontally), squashed (vertically), or worse, the content gets cropped. The aspect ratio calculator carries out this exact scaling for you, supports the most common display, photo, and social-media ratios as presets, and shows the GCD-reduced (lowest-term) ratio alongside the raw decimal so you can verify the result at a glance.

The calculator is useful for video editors exporting to YouTube (16:9) or TikTok (9:16), photographers cropping to standard photo ratios (3:2 or 4:5), designers laying out slides that must fit a given frame, and anyone who needs to know the exact pixel dimensions of a target box without breaking the source ratio. It also includes a built-in diagonal-to-physical-size helper for screen buyers who know the diagonal of a monitor in inches and want the width and height in centimetres.

How to Use the Aspect Ratio Calculator

  1. Enter the original width and height of the source image, video, or frame in pixels (or any consistent unit).
  2. Choose a solve mode: Lock ratio, scale to fit (compute the missing dimension from a given target) or Resize to fit a target box (fit inside a max W ร— max H envelope).
  3. If you want to override the ratio directly, pick a preset (16:9, 4:3, 21:9, 1:1, 4:5, 9:16, 3:2, 5:4, 2.39:1, 2.35:1) or enter a custom W:H. The result panel updates instantly.
  4. Read the result: the new W and H, the raw decimal ratio, and the GCD-reduced ratio (e.g. 16:9 when the inputs are 1920ร—1080).
  5. Optional: enable the diagonal helper to convert a screen-size diagonal in inches to physical width and height in centimetres for the chosen ratio.

The Formula

The core operation is one equation in two orientations:

newHeight = newWidth ร— (originalHeight / originalWidth)

newWidth = newHeight ร— (originalWidth / originalHeight)

For the "fit inside a box" mode, the calculator computes the smaller of two scaling factors:

scale = min(targetMaxWidth / originalWidth, targetMaxHeight / originalHeight)

newWidth = originalWidth ร— scale

newHeight = originalHeight ร— scale

The reduced ratio is computed by dividing both dimensions by their greatest common divisor (GCD):

reducedW = round(originalWidth / GCD(originalWidth, originalHeight))

reducedH = round(originalHeight / GCD(originalWidth, originalHeight))

The diagonal-to-physical-size helper uses the Pythagorean projection. If the diagonal is d inches and the ratio is W:H, the physical width and height in inches are:

physicalW_inches = d ร— (W / โˆš(Wยฒ + Hยฒ))

physicalH_inches = d ร— (H / โˆš(Wยฒ + Hยฒ))

Each physical dimension is then converted to centimetres by multiplying by 2.54 (the SI-defined conversion factor for the inch).

Worked Examples

The four worked examples below are the exact spot-checks baked into the calculator's "Verification examples" panel. Running them in any order produces the same numbers.

Example 1, 1920ร—1080 scaled to 1280 wide

Original (W, H) = (1920, 1080). Lock ratio, set new W = 1280.

ratio = 1080 / 1920 = 0.5625 newH = 1280 ร— 0.5625 = 720.0 px GCD(1920, 1080) = 120 โ†’ reduced W = 1920/120 = 16, reduced H = 1080/120 = 9 โ†’ 16:9 โœ“

The result is the standard 720p HD frame; the ratio is preserved exactly because the GCD is non-zero and divides both dimensions evenly.

Example 2, 1080ร—1920 with new W = 1080

Original (W, H) = (1080, 1920). Lock ratio, set new W = 1080.

ratio = 1920 / 1080 = 1.7777โ€ฆ newH = 1080 ร— (1920 / 1080) = 1920.0 px GCD(1080, 1920) = 120 โ†’ reduced W = 9, reduced H = 16 โ†’ 9:16 โœ“

This is the standard vertical-video frame used by Instagram Stories, TikTok, and YouTube Shorts. The reduced ratio confirms 9:16 even though the original was 1080ร—1920 (the long axis is height, not width).

Example 3, 4032ร—3024 scaled to 1920 wide

Original (W, H) = (4032, 3024). Lock ratio, set new W = 1920.

ratio = 3024 / 4032 = 0.75 newH = 1920 ร— 0.75 = 1440.0 px GCD(4032, 3024) = 1008 โ†’ reduced W = 4032/1008 = 4, reduced H = 3024/1008 = 3 โ†’ 4:3 โœ“

This is the iPhone 12 Pro Max's full-resolution 12 MP capture. Down-scaling to 1920 wide gives a 1920ร—1440 image at exactly the 4:3 ratio that the sensor captures.

Example 4, 1920ร—1080 resized to fit 1000 wide

Original (W, H) = (1920, 1080). Fit inside a square 1000 ร— 1000 box.

originalRatio = 1920 / 1080 = 1.7777โ€ฆ boxRatio = 1000 / 1000 = 1.0 original is wider than the box โ†’ constrain by width. newW = 1000 newH = 1000 ร— (1080 / 1920) = 562.5 px

The decimal 562.5 is preserved end-to-end, never truncated to 562 or rounded to 563. The result panel shows both the integer pixel count (563 when rounded for display) and the exact float (562.5) so the math is auditable.

Where It Shows Up

Photography and social media. Instagram's feed crops portrait images to 4:5, TikTok and YouTube Shorts use 9:16 for vertical full-screen, and the standard 35 mm photo frame is 3:2. When you export a photo for these platforms, set the calculator to 4:5 or 9:16 and check the resulting pixel dimensions before upload.

HDTV and cinema. 16:9 is the HDTV standard (rec. ITU-R BT.709), 21:9 is the ultra-wide cinema format, 2.39:1 is the anamorphic-scope cinema presentation, and 2.35:1 is the older CinemaScope standard. Editors cutting a 1.85:1 or 2.39:1 master use the calculator to plan the export frame size.

Web design and UI. Hero images and banner graphics are often sized to fixed pixel widths (1920, 1440, 1280) for retina and standard displays. The "lock ratio, scale to fit" mode lets you compute the matching height instantly.

Screen sizing. When you buy a 24-inch or 27-inch monitor, the diagonal is the advertised number. The diagonal helper converts that to the actual width and height in centimetres for the display's native ratio, useful for verifying that a desk or wall mount will fit the screen's true dimensions.

Print and large-format graphics. Posters, banners, and pull-up displays are often sized in inches or centimetres with a target ratio. Fit-mode lets you compute the largest frame that fits inside a printer's roll width or a wall's cut-out.

Common Mistakes to Avoid

Truncating the float. When the new height is 562.5, the calculator returns 562.5, not 562 (truncated) or 563 (rounded). Display rounded values for pixels, but keep the raw float for any further math; otherwise the ratio drifts over multiple operations.

Ignoring the GCD zero case. When both dimensions are zero, GCD returns 0 and the reduced ratio is undefined. The calculator falls back to showing the raw decimal in that case rather than producing a "0:0" string. Always check the inputs if the reduced ratio looks wrong.

Mixing portrait and landscape conventions. The calculator is W-first: 16:9 is wider than tall, 9:16 is taller than wide. If you enter 1080ร—1920 as (W, H) you are saying a 1080-wide frame with a 1920-tall image, a portrait frame. Swap them only if you intend to flip the orientation.

Forgetting to lock the ratio when resizing. Resizing 1920ร—1080 to exactly 1000ร—800 breaks the ratio (1000/800 = 1.25, not 1.778). The result is a distorted image. Always use the lock mode or the fit mode when the target dimensions don't match the source ratio.

Using the wrong preset for the platform. 9:16 for Instagram Stories is NOT the same as 4:5 for an Instagram feed post. Double-check the preset before export, Stories and Reels are taller than the feed image.

Confusing "fit inside" with "fill the box". The calculator's fit mode scales so the result fits inside the box without exceeding either axis. If a platform requires the image to fill the box (covering both axes, with cropping), you need a different operation, usually a centre-crop of the result image.

Frequently Asked Questions

What is an aspect ratio? An aspect ratio is the proportional relationship between an image's width and height, written as W:H (e.g. 16:9) or as a decimal (e.g. 1.778). It describes the shape of a rectangle, not its size, a 1920ร—1080 image and a 1280ร—720 image have the same 16:9 ratio, just at different resolutions.

Why does 16:9 sometimes show as 1.78 and sometimes as 1.778? Both are approximations of the same ratio. The exact decimal is 16/9 = 1.77777โ€ฆ (repeating). The calculator shows the first six decimal places by default; tools that round to two may display 1.78. The underlying ratio is identical.

How do I compute the GCD-reduced ratio? Divide both dimensions by their greatest common divisor (GCD). For 1920ร—1080, GCD is 120, so reduced = 1920/120 : 1080/120 = 16:9. The Euclidean GCD algorithm finishes in O(log min(W, H)) steps regardless of how large the inputs are.

Can the calculator handle decimal ratios like 2.39:1? Yes. The presets include 2.39:1 and 2.35:1, and the custom ratio inputs accept any positive number. The GCD is computed on the rounded integer form, so the reduced ratio is shown as the closest integer pair.

What happens if I enter 0 or a negative number? The calculator returns a friendly error and does not produce a result. Width and height must be positive. The diagonal helper also rejects 0 and negative inputs.

Is the diagonal helper accurate? The math is exact: it uses the Pythagorean projection of the diagonal onto the W and H axes. The conversion 1 inch = 2.54 cm is the international yard-and-pound agreement value (1959) and is exact. The result is precise to the centimetre displayed.

What is the difference between 21:9 and 2.39:1? Both are ultra-wide cinema formats. 21:9 = 2.333:1 (used by some TV standards and ultrawide monitors). 2.39:1 is the SMPTE anamorphic-scope cinema presentation. They differ by about 0.057 in the decimal ratio, which is noticeable on a 4K-projected image.

How do I check my result? Divide the new width by the new height, the decimal should match the original ratio to within floating-point precision. If the original was 1920ร—1080 and you scaled to 1280 wide, the result 1280 ร— 720 has decimal 1.7777โ€ฆ, identical to 1920/1080.

Why does the GCD-reduced ratio sometimes differ from a clean preset? The GCD reduction produces the lowest-term integer representation. If you entered 1920ร—1080 and the reduced ratio shows 16:9, that is the simplest integer pair, mathematically equivalent. Some non-exact ratios (like 2.39:1) round to the nearest integer pair when reduced.

Can I use this for video bitrate or colour calculations? No. The calculator is dimension-only. For video bitrate use a dedicated bitrate calculator; for colour-space conversions (sRGB, Rec. 709, Rec. 2020) see a colour-management tool. Aspect ratio is one of several independent video constraints.

can the Aspect Ratio Calculator be used for professional or commercial purposes? yes, the Aspect Ratio Calculator provides mathematically correct results that are suitable for professional, commercial, and educational use. The exact-float math is auditable: every output is reproducible from the inputs by hand. For high-stakes applications (medical imaging, legal evidence, broadcast specifications), verify results against a domain-specific reference or a calibrated tool.

For the Aspect Ratio Calculator, How often are the underlying formulas updated? The formulas are based on established mathematical relationships (proportional scaling, Pythagorean projection, Euclidean GCD) and the SI-defined inch-to-centimetre conversion (1959). They do not require updates. The presets list may grow as new platform ratios emerge (e.g. emerging social-media formats); the calculator is updated to reflect current standard practice when changes are agreed.

Does the calculator work offline? Yes. All math runs locally in your browser, no server calls, no API requests, no external dependencies. The component is fully self-contained and can be cached for offline use once loaded.

What is the difference between 16:9 and 16:10? 16:9 is the HDTV standard (1920ร—1080, 1280ร—720). 16:10 is the older computer-monitor standard (1920ร—1200, 1680ร—1050). The decimal ratio is 1.778 for 16:9 and 1.6 for 16:10, a meaningful difference when scaling slide content between TV and projector.

How do I display the result on a 4K or 8K screen? The result is unitless, pixels are simply proportional. If you scale 1920ร—1080 to 1280ร—720, the same ratio applies to 3840ร—2160 (4K) โ†’ 2560ร—1440 (QHD) or 7680ร—4320 (8K) โ†’ 5120ร—2880. The math is identical; only the multipliers change.

What is letterboxing and pillarboxing? Letterboxing is the black bars added to the top and bottom of a frame when the source aspect ratio is wider than the display (e.g. showing a 2.39:1 film on a 16:9 TV). Pillarboxing is the black bars added to the sides when the source is taller than the display (e.g. showing a 4:3 video on a 16:9 screen). The calculator prevents you from accidentally producing these by enforcing the ratio.

References

  • Rec. ITU-R BT.709 (2015). Parameter values for the HDTV standards for production and international programme exchange. International Telecommunication Union, Geneva.
  • SMPTE ST 2014-1:2009. VC-1 Compressed Video Bitstream Format and Decoding Process. Society of Motion Picture and Television Engineers.
  • Society of Motion Picture and Television Engineers. SMPTE Cinema Aspect Ratio standards (2.39:1 scope, 2.35:1 CinemaScope).
  • ISO 80000-3:2006. Quantities and units, Part 3: Space and time. International Organisation for Standardisation, Geneva.
  • International yard and pound agreement (1959). Exact definition of the inch as 25.4 mm.