In more detail
The ratio is found by dividing width and height by their greatest common divisor: 1920 × 1080 simplifies to 16:9 and 4000 × 3000 to 4:3. Some common names are rounded: an ultrawide 2560 × 1080 screen is exactly 64:27 but sold as "21:9", and 1366 × 768 is only approximately 16:9. Ratios are also written as one number, such as 1.78 for 16:9 or 2.39 for widescreen cinema.
Why it matters
To resize without distortion, scale both sides by the same factor. Fitting an image into a frame of a different ratio forces a choice: crop part of the picture, add bars (letterboxing or pillarboxing), or stretch it, which distorts faces and circles. Social platforms each expect their own ratios, such as 1:1, 4:5 (1080 × 1350) or 9:16 for vertical video.
Example
Keeping 4:3, an image resized to 1200 pixels wide must be 1200 × 3 ÷ 4 = 900 pixels tall. Cropping a 4000 × 3000 photo to 16:9 at full width gives 4000 × 2250.
Common confusion
Aspect ratio is a shape, not a size: 1280 × 720 and 3840 × 2160 are both 16:9 at very different resolutions.