Aspect ratio (locked)
- Decimal ratio
- —
- Simplified
- —
- Megapixels
- —
Target size (px)
Edit the width or height — the other side is filled to keep the locked aspect ratio. Everything is computed in your browser.
An aspect ratio calculator that keeps the ratio fixed while you solve width and height in pixels. Choose a preset — 16:9, 4:3, 3:2, 1:1, 21:9, 1.91:1 and more — or type the width and height ratio directly to lock the ratio. Then enter a target width or height and the other side fills in instantly to keep the locked ratio (change the width and the height follows; change the height and the width follows). At the same time it shows the simplified integer ratio (e.g. 1920×1080 → 16:9), the decimal ratio (16:9 → 1.7778 : 1), and the total pixel count in megapixels, so you can sanity-check resolutions or answer "what's the nearest clean ratio?". A Swap W / H button flips landscape ⇄ portrait in one click. It's handy whenever you need to keep the ratio but change the size: matching video export dimensions, sizing a YouTube thumbnail or social image, laying out print, or working out dimensions before resizing an image. All calculation happens in your browser — the numbers you enter are never sent to any server or API.
How to use
- Pick an aspect ratio from the presets, or type the width and height ratio to lock it.
- Enter a target width or height and the other side is solved automatically at the locked ratio.
- Read off the simplified integer ratio, the decimal ratio, and the megapixels (nothing is sent).
FAQ
Are the numbers I enter sent anywhere?
No. Both the ratio and the dimension calculations run entirely in your browser. The values you type are never sent to any server or API — it all stays on your device.
What ratio is 1920×1080?
Enter 1920 for width and 1080 for height; the simplified ratio field shows 16:9. If the numbers don't reduce to whole numbers, it shows a decimal ratio (e.g. x.xxxx : 1) instead.
I want a different size at the same ratio.
First lock the ratio you want (preset or direct entry), then enter a new width (or height). The other side is computed automatically while keeping the locked ratio.
I need a Stable Diffusion size rounded to a multiple of 64.
This tool is a pure ratio-preserving dimension calculator. If you want to keep an SDXL/SD model's native pixel count while rounding each side to a multiple of 64, the SD Resolution (sd-resolution) tool is a better fit.