Free Aspect Ratio Calculator
Calculate the aspect ratio of any dimensions, or find the missing dimension from a known side and ratio. Includes 12 common presets.
Exact resolutions for 16:9
Common dimensions
Common uses
- Calculate Ratios for Responsive DesignFind the correct height for responsive images and containers given a fixed width and target ratio.
- Calculate Aspect Ratios for VideoFind the correct dimensions for 16:9, 4:3, 9:16 and other common video aspect ratios.
- Calculate Dimensions for Social MediaGet exact pixel dimensions for Instagram, Twitter, LinkedIn, and Facebook image formats.
- Calculate Image Dimensions for WebEnsure images fit their containers perfectly β find the right width and height for any layout.
- Calculate Print DimensionsConvert print sizes between different aspect ratios β plan crops before sending to a print shop.
How It Works
All three calculation modes β simplify a ratio, derive missing dimensions, and lock-ratio resize β run as pure JavaScript arithmetic in your browser using a hand-written Euclidean GCD algorithm. No library, no server, no file upload involved.
- 1GCD reduces the ratioWhen you enter width and height, the tool runs Euclid's algorithm (gcd(a, b) = gcd(b, a % b)) repeatedly until the remainder is zero, then divides both sides by that divisor to produce the simplified integer ratio, e.g. 1920 Γ 1080 becomes 16:9.
- 2Named-ratio lookupThe decimal ratio (width / height) is compared against a hard-coded table of 12 common ratios β 1:1, 4:3, 16:9, 21:9, 2.39:1, and so on. If the difference is within 0.05, the closest name is displayed alongside the reduced fraction.
- 3Derived dimension or resize calculationIn Ratio-to-Dimensions mode, the missing side is calculated as knownValue / ratio (or knownValue * ratio), rounded to the nearest integer, with a fallback that finds the nearest exact-integer multiple of the simplified ratio. In Resize mode, the locked side is computed as (newDimension * originalOther) / originalThis β a single cross-multiplication.
- 4Matching resolutions enumeratedAfter simplification, the tool walks a fixed list of 14 standard widths (480 px through 7680 px) and tests tw % simplifiedWidth === 0 to find up to six resolutions that share the exact same ratio, listing them for one-click copy.
Related Tools
Video Crop
Crop a video to 9:16, 1:1, 4:5 or 16:9, or fit the whole picture in with a blurred, coloured or black background, with nothing cut off.
Ratio Calculator
Simplify a ratio, solve a proportion (a:b = c:x), or split a total into ratio parts.
Video Frame Grabber
Capture a still image from any frame of a video at full resolution. Scrub, step frame-by-frame, and save as PNG or JPG. Instant and entirely in your browser.