Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aspect-ratio-data

Common aspect ratios and screen, video and cinema resolutions as CSV and JSON, plus a small dependency-free JavaScript module to simplify a ratio, resize while keeping it, find the nearest standard ratio and work out letterbox or pillarbox bars.

  • data/aspect-ratios.csv / .json: 25 ratios
  • data/resolutions.csv / .json: 30 resolutions
  • aspect-ratio.js: simplify, toDecimal, resize, nearestStandard, fit

An interactive calculator built on the same ratios and resolutions is at pixelhandbook.com.

Data

Every named row links to the Wikipedia article its numbers and name were checked against on 2026-09-15. The simplified/ratio, decimal and megapixels columns are calculated by scripts/build.mjs, not typed by hand, and the tests recompute them.

Columns

aspect-ratios: ratio (as usually written), width, height, simplified (whole numbers), decimal (width ÷ height, 3 decimals), name, source

resolutions: group (video, cinema, display), name, width, height, ratio (simplified), decimal, megapixels, source, note

Aspect ratios

Ratio Simplified Decimal Name
1:1 1:1 1 Square
1.19:1 119:100 1.19 Movietone
5:4 5:4 1.25
4:3 4:3 1.333
1.375:1 11:8 1.375 Academy ratio
1.43:1 143:100 1.43 IMAX (about 1.43:1)
3:2 3:2 1.5
16:10 8:5 1.6
5:3 5:3 1.667
16:9 16:9 1.778 Widescreen
1.85:1 37:20 1.85 Flat (DCI)
256:135 256:135 1.896 DCI full container (4096 × 2160, 2048 × 1080)
2:1 2:1 2 Univisium
2.2:1 11:5 2.2 70 mm film
21:9 7:3 2.333
2.35:1 47:20 2.35 Anamorphic, films of 1958–1970 (also used loosely for 2.39:1)
64:27 64:27 2.37 Ultrawide monitors sold as 21:9 (2560 × 1080, 3440 × 1440 is 43:18)
2.39:1 239:100 2.39 Scope (DCI)
2.4:1 12:5 2.4
2.55:1 51:20 2.55 CinemaScope (early)
2.76:1 69:25 2.76 Ultra Panavision 70
32:9 32:9 3.556 Super-ultrawide (marketing name), e.g. DQHD
9:16 9:16 0.563
4:5 4:5 0.8
2:3 2:3 0.667

Resolutions

Group Name Size Ratio Decimal MP Note
video DV 525/60 frame 720 × 480 3:2 1.5 0.35 Same frame size is used for 4:3 and 16:9 video, with different pixel aspect ratios
video DV 625/50 frame 720 × 576 5:4 1.25 0.41 Same frame size is used for 4:3 and 16:9 video, with different pixel aspect ratios
video 720p 1280 × 720 16:9 1.778 0.92
video 1080p (Full HD) 1920 × 1080 16:9 1.778 2.07
video 1440p (QHD) 2560 × 1440 16:9 1.778 3.69
video 4K UHD 3840 × 2160 16:9 1.778 8.29
video 8K UHD 7680 × 4320 16:9 1.778 33.18
cinema DCI 2K 2048 × 1080 256:135 1.896 2.21
cinema DCI 2K Flat (1.85:1) 1998 × 1080 37:20 1.85 2.16
cinema DCI 2K Scope (2.39:1) 2048 × 858 1024:429 2.387 1.76 Exact ratio 1024:429 (2.387:1)
cinema DCI 4K 4096 × 2160 256:135 1.896 8.85
cinema DCI 4K Flat (1.85:1) 3996 × 2160 37:20 1.85 8.63
cinema DCI 4K Scope (2.39:1) 4096 × 1716 1024:429 2.387 7.03 Exact ratio 1024:429 (2.387:1)
display VGA 640 × 480 4:3 1.333 0.31
display SVGA 800 × 600 4:3 1.333 0.48
display XGA 1024 × 768 4:3 1.333 0.79
display WXGA 1280 × 800 8:5 1.6 1.02
display SXGA 1280 × 1024 5:4 1.25 1.31
display WXGA (16:9 variant) 1366 × 768 683:384 1.779 1.05 Close to 16:9, exactly 683:384
display WXGA+ 1440 × 900 8:5 1.6 1.3 Also called WSXGA
display HD+ 1600 × 900 16:9 1.778 1.44
display WSXGA+ 1680 × 1050 8:5 1.6 1.76
display WUXGA 1920 × 1200 8:5 1.6 2.3
display WQXGA 2560 × 1600 8:5 1.6 4.1
display UWFHD 2560 × 1080 64:27 2.37 2.76 Sold as 21:9, exactly 64:27
display UWQHD 3440 × 1440 43:18 2.389 4.95 Sold as 21:9, exactly 43:18
display 5K 5120 × 2880 16:9 1.778 14.75
display UW5K 5120 × 2160 64:27 2.37 11.06 Sold as 21:9, exactly 64:27
display DQHD 5120 × 1440 32:9 3.556 7.37 32:9
display 6K (Apple Pro Display XDR) 6016 × 3384 16:9 1.778 20.36

Things worth knowing from the table:

  • Monitors sold as "21:9" are not 21:9. 2560 × 1080 and 5120 × 2160 are 64:27 (2.370:1) and 3440 × 1440 is 43:18 (2.389:1); 21:9 is 2.333:1.
  • DCI "Scope" at 2048 × 858 and 4096 × 1716 is exactly 1024:429 (2.387:1), presented as 2.39:1.
  • DV stores 720 × 480 and 720 × 576 frames for both 4:3 and 16:9 video, using different pixel aspect ratios. The ratios in this table are of the stored pixels.

JavaScript

Works in Node.js 20.10+ (import ... with { type: 'json' }) and in browsers that support JSON import attributes (tested in Chromium 153).

import { simplify, resize, nearestStandard, fit } from './aspect-ratio.js';

simplify(2560, 1080);                       // [64, 27]
resize(1920, 1080, { width: 1000 });        // { width: 1000, height: 563, ratioChangePercent: -0.088... }
resize(1920, 1080, { width: 1000 }, 'even'); // height 562 (even sizes for 4:2:0 video)
nearestStandard(2048, 858);                 // { ratio: '2.39:1', name: 'Scope (DCI)', differencePercent: -0.127... }
fit(2048, 858, 1920, 1080);                 // { mode: 'letterbox', width: 1920, height: 804, bar: 138, usedPercent: 74.479... }
  • simplify(width, height) accepts decimals up to 6 places (2.39, 1 → 239:100).
  • resize rounds the calculated side to whole numbers by default; 'even' rounds to even numbers and 'none' keeps decimals. ratioChangePercent shows how much rounding moved the ratio.
  • nearestStandard compares against data/aspect-ratios.json as landscape and turns the result back for portrait sizes.
  • fit places content inside a screen without cropping. bar is the size of each bar; usedPercent is the share of the screen the picture covers.

Development

npm run build   # regenerate data/ from scripts/data-source.mjs
npm test        # node --test

License

MIT

About

Common aspect ratios and screen, video and cinema resolutions as CSV/JSON (with Wikipedia sources), plus a tiny JS helper to simplify, resize and letterbox.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages