Enter any two values — width, height, or ratio — and the third fills in instantly. Detect dimensions from a file, calculate crops and letterbox bars, compare ratios side by side, and share a link to your exact calculation.
This calculator works out width, height, or ratio from any two known values — instantly, with no account and nothing installed. Here's everything you need to know, including tips for specific use cases and devices.
Enter any two values, or detect them from a file
Type in a width, a height, or a ratio (e.g. 16:9) — any two of the three fields is enough. Or drop an image/video into the "Detect From File" card and the exact pixel dimensions are read automatically.
Pick a preset, a platform size, or browse resolutions
Click any of the 12 common presets, or a named platform size like "Instagram Story" for exact pixel dimensions. The resolutions table updates to show standard sizes for the matching ratio.
Scale, crop, or letterbox using the current ratio
Once a ratio is set, use Scale to Size to find a matching dimension at a different size, Crop Calculator to find a centered crop box from a larger original, or the Letterbox/Pillarbox Calculator to work out bar sizes when fitting content into a different frame ratio.
Enter your image's width and height — leave the ratio fields blank — or drop the file directly into the "Detect From File" card. The calculator uses the greatest common divisor (GCD) to simplify the ratio automatically. For example, 1920 × 1080 simplifies to 16:9, and 800 × 600 simplifies to 4:3. If your dimensions don't match a standard ratio exactly, the nearest standard ratio is shown for reference.
Enter your width value, then set the ratio — either by typing in the ratio fields or clicking a preset. The height is calculated as width × ratio_H ÷ ratio_W. Calculated fields are highlighted in amber so you always know which value was derived versus typed.
Set your target ratio in the Calculator card, then enter your original image's width and height into the Crop Calculator. It works out the largest centered box matching that ratio, along with the pixel offset from each edge — useful for cropping a photo to a specific ratio without distorting it.
Letterboxing adds black bars above and below content that's wider than the display frame; pillarboxing adds bars on the sides for content that's narrower. Set your content's ratio in the Calculator card and your target frame size in the Letterbox/Pillarbox Calculator to see the exact bar size in pixels.
Use 16:9 for standard YouTube videos — recommended at 1920×1080 (Full HD) or 3840×2160 (4K). For YouTube Shorts, Reels, and TikTok, use 9:16 vertical at 1080×1920 — both are in the Social & Platform Sizes card above.
All math happens instantly in your browser using JavaScript — nothing is ever sent to a server, including files dropped into the "Detect From File" card, which are only ever read locally to measure their pixel dimensions. That means it works offline once the page has loaded, and it's safe to use with dimensions or files from private or confidential projects.