Decimal Ratio to Exact Pixels Calculator
A literal 1.78:1 is exactly 89:50. Its pixel sizes are multiples of 89 × 50. At 1,920 pixels wide, the nearest whole height is 1,079 pixels. The familiar 1,920 × 1,080 frame is exactly 16:9, about 0.124844% narrower in ratio than 1.78:1.
Drift compares width divided by height against the typed decimal. Nearest exact size may exceed the entered width.
Turn the decimal into a pixel step
Read the digits as a fraction before rounding anything. Two digits after the point make 1.78 equal to 178/100. Dividing both integers by two gives 89/50. For a reduced fraction p/q, an exact raster must satisfy qW = pH. Since p and q share no factor, p must divide W, and q must divide H. Every exact pair therefore has the form (pk, qk) for a positive whole number k. Typing 1.7800 gives 17800/10000 and reduces to the same pair.
At width 1,920, division by 89 leaves a remainder of 51. The exact widths bracketing it are 1,869 and 1,958, separated from the request by 51 and 38 pixels respectively. The associated heights are 1,050 and 1,100. If 1,920 is a hard width cap, use 1,869 × 1,050. If it is a target and you can move either way, 1,958 × 1,100 comes closer.
Audit the two integer heights around 1,920 pixels
The ideal height is 1920 × 50 / 89 = 1078.651685… pixels. The two adjacent whole heights are 1,078 and 1,079. The calculator picks the one closer to the ideal height, breaking a half-pixel tie upward. It then reports signed ratio drift separately, using 100 × (qW − pH) / (pH).
For 1,079 pixels, the cross products are 96,000 and 96,031, giving a drift of −31/96031 × 100, or −0.032281%. For 1,078 pixels, the second product falls to 95,942, giving +58/95942 × 100, or +0.060453%. A shorter height pushes the ratio upward at the same width. Either raster differs from the decimal, even when an editor formats the measured ratio to two places and displays both as 1.78.
Compare a small-denominator fraction
With a denominator limit of 20, the closest fraction to 89/50 is 16/9. For each eligible denominator d, the calculator tests the nearest positive integer to 89d/50, then compares the absolute gaps between those fractions and 89/50. It prefers the smaller denominator when gaps tie. For 16/9, the absolute gap is 1/450. Another common wide shape, 7/4, is 3/100 away, over thirteen times farther.
The 1,920 × 1,080 pair passes the candidate check because 1920 × 9 = 1080 × 16 = 17,280. Against the decimal, the same pair produces 1920 × 50 = 96,000 and 1080 × 89 = 96,120. Divide their difference by 96,120 to get −0.124844%. At a denominator limit of 50, the closest fraction changes to 89/50 itself and candidate drift becomes zero. The fixed width still leaves the same remainder, so the candidate's rounded raster remains approximate.
Check the source of a rounded label
A report rounded to two decimal places can label ratios in the interval from 1.775 up to, but excluding, 1.785 as 1.78 under ordinary half-up rounding. A 1,785 × 1,000 frame lies on the upper boundary and rounds to 1.79. A 1920 × 1080 frame sits inside the interval, as does a 1780 × 1000 frame, despite the two having different exact ratios. Original pixel dimensions resolve that ambiguity. When a delivery spec gives a literal decimal, use the reduced decimal fraction as the target. When it also supplies a pixel preset, verify whether the preset or the printed label takes precedence before exporting.
References and related checks
For fraction parsing and denominator limits, see the Python fractions reference. For the width-first ratio convention, see CSS Values and Units. For whole-pixel sizes constrained by both edges, use the closest exact size calculator.