Aspect ratio calculator
Calculated in your browser · nothing is uploaded
Three answers in one: the reduced aspect ratio of a width and height, the missing dimension when you know a ratio and one side, and the largest box of a given ratio that fits inside a container.
How to use the aspect ratio calculator
Reducing a ratio is division by the greatest common divisor, and the honest answer is sometimes useless. 1366×768 reduces to 683:384, which is arithmetically right and is not what anyone means, that screen is sold as 16:9 and is very slightly not. Both are shown here: the exact reduction, and the common ratio it is within a percent of.
The fit calculation is the one that comes up most in practice, because it is what happens when a video is letterboxed or an image is placed in a fixed frame. The largest box of ratio w:h inside a container is found by scaling to whichever dimension runs out first, which is the same min() that CSS object-fit: contain performs. If the numbers come out with the container’s full width and less than its height, the bars are top and bottom; the other way round and they are at the sides.
A note on 16:10 versus 8:5. They are the same ratio — 2560×1600 reduces to 8:5, but everyone says 16:10, because it sits next to 16:9 in a spec sheet. That is convention, not maths.
Questions
That is the exact reduction. The screen is sold as 16:9 and is a fraction off, which is why the common ratio is shown too.
Use the ratio tab to get the ratio, then the missing-side tab with your new width. Anything else stretches it.
Letterboxing; the largest box of your ratio that fits a container. It is the same calculation as CSS object-fit: contain.
Yes, exactly. 8:5 is the reduced form; 16:10 is what people say because it reads next to 16:9.
Yes. 9:16 and other portrait ratios work the same way.