{"id":259,"date":"2026-08-21T19:41:28","date_gmt":"2026-08-21T19:41:28","guid":{"rendered":"https:\/\/netguide.io\/tools\/aspect-ratio-calculator\/"},"modified":"2026-08-21T19:41:28","modified_gmt":"2026-08-21T19:41:28","slug":"aspect-ratio-calculator","status":"publish","type":"post","link":"https:\/\/netguide.io\/tools\/en\/aspect-ratio-calculator\/","title":{"rendered":"Aspect Ratio Calculator"},"content":{"rendered":"<div id=\"netgu-3523387265\" class=\"netgu-before-content netgu-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6258556257245998\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-6258556257245998\" \ndata-ad-slot=\"3494115342\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n<style>\n.wp-ar-container { max-width:100%; background:#fff; padding:20px; border:1px solid #ddd; border-radius:10px; font-family:-apple-system, sans-serif; color:#333; }\n.wp-ar-title { margin:0 0 15px 0; color:#2271b1; font-size:1.4rem; }\n.wp-ar-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:12px; margin-bottom:10px; }\n.wp-ar-input-group label { display:block; font-size:11px; font-weight:bold; margin-bottom:4px; text-transform:uppercase; color:#666; }\n.wp-ar-input-group input, .wp-ar-input-group select { width:100%; padding:8px; border:1px solid #ccc; border-radius:4px; box-sizing:border-box; }\n.wp-ar-checkbox-group { margin:15px 0; font-size:12px; display:flex; align-items:center; gap:8px; color:#666; }\n.wp-ar-note { font-size:12px; color:#666; margin-top:12px; min-height:1em; }\n.wp-ar-warn { color:#d63638; font-weight:bold; }\n.wp-ar-results { margin-top:20px; border-top:2px solid #eee; padding-top:15px; }\n.wp-ar-res-item { display:flex; justify-content:space-between; margin-bottom:6px; font-size:14px; gap:10px; }\n.wp-ar-total { font-weight:bold; font-size:18px; color:#2271b1; margin:10px 0; padding:5px 0; border-top:1px solid #eee; border-bottom:1px solid #eee; }\n.wp-ar-val { color:#2271b1; font-weight:bold; }\n.wp-ar-out { width:100%; box-sizing:border-box; padding:10px; border:1px solid #ccc; border-radius:4px; font-family:monospace; font-size:13px; word-break:break-all; background:#f7f7f7; margin-top:6px; }\n.wp-ar-btn { background:#2271b1; color:#fff; border:none; padding:9px 14px; border-radius:4px; cursor:pointer; font-size:13px; margin-top:10px; }\n<\/style><div class=\"wp-ar-container\">\n  <h3 class=\"wp-ar-title\">Aspect Ratio Calculator<\/h3>\n  <h4 style=\"margin:6px 0;color:#2271b1;\">Calculate the missing side<\/h4>\n  <div class=\"wp-ar-grid\">\n    <div class=\"wp-ar-input-group\"><label>Ratio W<\/label><input type=\"number\" id=\"ar-rw\" value=\"16\" min=\"1\" oninput=\"arFromW()\"><\/div>\n    <div class=\"wp-ar-input-group\"><label>Ratio H<\/label><input type=\"number\" id=\"ar-rh\" value=\"9\" min=\"1\" oninput=\"arFromW()\"><\/div>\n    <div class=\"wp-ar-input-group\"><label>Width (px)<\/label><input type=\"number\" id=\"ar-w\" value=\"1920\" min=\"0\" oninput=\"arFromW()\"><\/div>\n    <div class=\"wp-ar-input-group\"><label>Height (px)<\/label><input type=\"number\" id=\"ar-h\" value=\"1080\" min=\"0\" oninput=\"arFromH()\"><\/div>\n  <\/div>\n  <h4 style=\"margin:18px 0 6px;color:#2271b1;\">Ratio from resolution<\/h4>\n  <div class=\"wp-ar-grid\">\n    <div class=\"wp-ar-input-group\"><label>Width (px)<\/label><input type=\"number\" id=\"ar-res-w\" value=\"2560\" min=\"0\" oninput=\"arReduce()\"><\/div>\n    <div class=\"wp-ar-input-group\"><label>Height (px)<\/label><input type=\"number\" id=\"ar-res-h\" value=\"1440\" min=\"0\" oninput=\"arReduce()\"><\/div>\n    <div class=\"wp-ar-input-group\"><label>Ratio \\u2192<\/label><input type=\"text\" id=\"ar-ratio-out\" readonly><\/div>\n  <\/div>\n  <div class=\"wp-ar-note\">Change width or height \u2013 the other side is calculated to match the ratio.<\/div>\n<\/div>\n<script>\nfunction arGcd(a,b){ a=Math.abs(a); b=Math.abs(b); while(b){ var t=b; b=a%b; a=t; } return a||1; }\nfunction arFromW(){ var rw=parseFloat(document.getElementById('ar-rw').value)||0, rh=parseFloat(document.getElementById('ar-rh').value)||0, w=parseFloat(document.getElementById('ar-w').value)||0; document.getElementById('ar-h').value = rw>0 ? Math.round(w*rh\/rw*1000)\/1000 : ''; }\nfunction arFromH(){ var rw=parseFloat(document.getElementById('ar-rw').value)||0, rh=parseFloat(document.getElementById('ar-rh').value)||0, h=parseFloat(document.getElementById('ar-h').value)||0; document.getElementById('ar-w').value = rh>0 ? Math.round(h*rw\/rh*1000)\/1000 : ''; }\nfunction arReduce(){ var w=parseFloat(document.getElementById('ar-res-w').value)||0, h=parseFloat(document.getElementById('ar-res-h').value)||0; if(w>0){ if(h>0){ var g=arGcd(w,h); document.getElementById('ar-ratio-out').value=(w\/g)+':'+(h\/g); return; } } document.getElementById('ar-ratio-out').value=''; }\narFromW(); arReduce();\n<\/script>\n\n\n<div id=\"netgu-311975439\"><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6258556257245998\"\r\n     crossorigin=\"anonymous\"><\/script>\r\n<!-- NetGuide.io-After-Widget-Tools -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-6258556257245998\"\r\n     data-ad-slot=\"5175852350\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Calculate aspect ratios easily<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Whether 16:9, 4:3 or 21:9 \u2013 the calculator finds the missing edge length for a given aspect ratio. Conversely, it reduces a resolution (e.g. 2560\u00d71440) to its ratio.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Missing side:<\/strong> Enter a ratio and one edge length \u2013 the other is calculated.<\/li>\n\n\n<li><strong>Ratio from resolution:<\/strong> Reduces width and height to the smallest integer ratio (via the greatest common divisor).<\/li>\n\n\n<li><strong>Use:<\/strong> Videos, images, displays and responsive layouts.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Related calculators<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"\/tools\/en\/unit-converter\/\">Unit Converter<\/a><\/li>\n\n\n<li><a href=\"\/tools\/en\/percentage-vat-calculator\/\">Percentage &#038; VAT Calculator<\/a><\/li>\n<\/ul>\n\n\n<div id=\"netgu-1197547923\" class=\"netgu-after-content netgu-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6258556257245998\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-6258556257245998\" \ndata-ad-slot=\"4559785002\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Calculate aspect ratios \u2013 the missing width\/height for a ratio (e.g. 16:9) or the ratio of a resolution. In the browser.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[158],"tags":[],"class_list":["post-259","post","type-post","status-publish","format-standard","hentry","category-rechner-calculator-en"],"brizy_media":[],"_links":{"self":[{"href":"https:\/\/netguide.io\/tools\/wp-json\/wp\/v2\/posts\/259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netguide.io\/tools\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netguide.io\/tools\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netguide.io\/tools\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netguide.io\/tools\/wp-json\/wp\/v2\/comments?post=259"}],"version-history":[{"count":0,"href":"https:\/\/netguide.io\/tools\/wp-json\/wp\/v2\/posts\/259\/revisions"}],"wp:attachment":[{"href":"https:\/\/netguide.io\/tools\/wp-json\/wp\/v2\/media?parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netguide.io\/tools\/wp-json\/wp\/v2\/categories?post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netguide.io\/tools\/wp-json\/wp\/v2\/tags?post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}