Skip to main content

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.

Works offline once loaded
Simplified ratio16:9
Decimal ratio1.7778:1
Named ratio16:9
Megapixels2.07 MP
16:9

Exact resolutions for 16:9

480 Γ— 270
640 Γ— 360
960 Γ— 540
1024 Γ— 576
1280 Γ— 720
1600 Γ— 900

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.

  1. 1
    GCD reduces the ratio
    When 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.
  2. 2
    Named-ratio lookup
    The 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.
  3. 3
    Derived dimension or resize calculation
    In 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.
  4. 4
    Matching resolutions enumerated
    After 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

Frequently Asked Questions