Aspect ratio calculator
Enter the size of an image, video or screen to get its ratio, then type a new width or height to get the other side.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter original width, original height, new width (optional) and new height (optional).
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Ratio = (width ÷ GCD) : (height ÷ GCD), where GCD is the greatest common divisor. New height = new width × height ÷ width, and new width = new height × width ÷ height.
Example
Inputs: Original width = 1,920 px, Original height = 1,080 px, New width (optional) = 1,280 px. Result: Simplified ratio: 16:9; Decimal ratio (width ÷ height): 1.7778; Closest common ratio: 16:9.
Limits and caveats
- The closest common ratio is approximate: 1366×768 is not exactly 16:9.
- New sizes can have fractions, so round to the nearest pixel when you apply them.
Questions about this tool
What size is a 16:9 image that is 1280 wide?
It is 720 pixels high, because 1280 × 9 ÷ 16 = 720.
What ratio is a 1080×1350 portrait post?
It is 4:5: the GCD is 270, and 1080 ÷ 270 = 4 while 1350 ÷ 270 = 5.
How do I set the ratio in CSS?
Use the aspect-ratio property, for example aspect-ratio: 16 / 9, so the element keeps its shape as the width changes.
