Aspect Ratio Calculator

About This Site

Most aspect ratio calculators do one of two annoying things: they round silently, or they refuse to admit that a resolution is not exactly the ratio it is sold as. Type 1366×768 into a lot of them and you get a confident "16:9". Type 1000 as a 16:9 width and you get "562" with no hint that the real answer was 562.5.

This one answers both questions instead of picking one. It gives the exact simplified ratio, the decimal, the nearest standard ratio with the distance to it, and an explicit warning whenever rounding changed a result. It is built and maintained by an independent developer who makes small, single-purpose web tools.

The formulas

Everything here is grade-school arithmetic, stated openly so you can check any output by hand:

  • Simplify: divide width and height by their greatest common divisor, found with Euclid's algorithm. This is exact — never an approximation. 1920 and 1080 share a GCD of 120, so 1920×1080 is 16:9. A worked step-by-step run is on the pixels-to-ratio page.
  • Decimal form: width ÷ height, shown to 4 places. Above 1 is landscape, below 1 is portrait.
  • Resize on a locked ratio: new height = new width × (ratio height ÷ ratio width), and the mirror image for width. The exact value is computed first, then rounded.
  • Rounding: round-half-to-even, the IEEE 754 default. 562.5 becomes 562, 563.5 becomes 564. Always rounding .5 upward biases every tie in one direction, which compounds when dimensions are scaled repeatedly. The rule is stated rather than hidden.
  • Nearest standard ratio: the input decimal is compared against a fixed list of 15 named ratios from 9:16 to 2.39:1, and the closest by relative difference is reported along with that difference as a percentage.
  • Letterbox and crop percentages: both are linear fractions along the affected axis. Fitting content of ratio c into a frame of ratio f where c > f gives bars covering 1 − f/c of the frame height; cropping to fill instead discards that same fraction of the content width.

Accuracy rules

  • No invented figures. Every number in the tables is computed from the resolution beside it, not recalled or estimated. Ratios, decimals, megapixels and percentages are all derivable from the two dimensions shown.
  • Exact and approximate are labelled separately. 3440×1440 is 43:18, not 21:9, and the ultrawide page says so plainly. 854×480 is flagged as not exactly 16:9 on the 16:9 chart rather than quietly listed.
  • Rounding is always visible. If a resize produced a fractional pixel, the tool shows the exact value, the rounded value, and which widths or heights would have avoided the problem.
  • Platform sizes are described as recommendations, not laws. Export sizes for social platforms are what those platforms commonly recommend; they change, and layouts change with them. Where an overlay or safe-zone depends on an app's current design, the site says to check the app's own preview rather than trusting a fixed pixel template.
  • Marketing names are not measurements. "21:9", "480p" and "19.5:9" are labels. The site gives the label and the measured ratio side by side.

How it is built

Static HTML generated ahead of time, with the calculator as a small JavaScript component. The ratio math lives in one pure module with no browser or network access, covered by a test suite that includes the specific cases this site makes claims about — 1920×1080 simplifying to 16:9, 1366×768 simplifying to 683:384 with a 16:9 suggestion, and the fractional-pixel resize behaviour.

Your data

The calculator runs entirely in your browser. There is no account, no server-side computation and no database. The dimensions you type never leave your device and we never receive them — there is nowhere for them to go. Details are in the privacy policy.

Corrections

If a number here is wrong, or a claim overreaches what the arithmetic supports, please say so — corrections get priority over feature requests. Use the contact page.