Aspect Ratio Calculator
Calculate aspect ratios and resize dimensions proportionally.
Aspect Ratio
16:9
Resize Proportionally
Code Examples
function resize(width, height, newWidth) {
const ratio = height / width;
return { width: newWidth, height: Math.round(newWidth * ratio) };
}
function gcd(a, b) {
return b ? gcd(b, a % b) : a;
}
function aspectRatio(w, h) {
const g = gcd(w, h);
return `${w/g}:${h/g}`;
}Frequently Asked Questions
What are common aspect ratios?
16:9 (HDTV, YouTube), 4:3 (old TVs, iPads), 21:9 (ultrawide monitors), 1:1 (Instagram squares), 9:16 (TikTok, Stories), 3:2 (35mm photos).