{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"aspect-ratio"},"result":{"entity_type":"calculator","id":"aspect-ratio","calculator_id":"aspect-ratio","canonical_url":"https://tttkmbb.com/everyday/aspect-ratio","name":"Aspect Ratio Calculator","title":"Aspect Ratio Calculator – Simplify Width:Height, Find the Closest Standard Ratio and Scale Dimensions","category":"everyday","category_name":"Everyday Life","tool_name":"calculate_aspect_ratio","featured_mcp_tool":false,"description":"Reduces a width and height to their simplest ratio and decimal value, identifies the closest common ratio (16:9, 4:3, 3:2, 21:9 …) and scales the dimensions to a new width or height while keeping the ratio.","use_when":"You need the aspect ratio of an image, screen or video, or the matching height for a new width (or width for a new height) when resizing.","do_not_use_when":"You need pixel density, file size or a crop to a different ratio; this only keeps the existing proportions.","inputs":[{"name":"width","label":"Width","type":"number","required":true,"max":1000000000,"exclusive_min":0,"description":"Width in any unit (pixels, cm …).","example":1920},{"name":"height","label":"Height","type":"number","required":true,"max":1000000000,"exclusive_min":0,"description":"Height in the same unit.","example":1080},{"name":"new_width","label":"New width","type":"number","required":false,"max":1000000000,"exclusive_min":0,"description":"Optional target width; the matching height is returned as scaled_height.","example":1280},{"name":"new_height","label":"New height","type":"number","required":false,"max":1000000000,"exclusive_min":0,"description":"Optional target height; the matching width is returned as scaled_width.","example":1440}],"outputs":[{"name":"ratio","label":"Aspect ratio","type":"string","decimals":4,"description":"Simplest integer ratio width:height (values with decimals are scaled to integers first)."},{"name":"ratio_decimal","label":"Ratio (decimal)","type":"number","decimals":4,"description":"width / height."},{"name":"closest_common_ratio","label":"Closest common ratio","type":"string","decimals":4,"description":"Nearest of 1:1, 5:4, 4:3, 3:2, 16:10, 16:9, 1.85:1, 2:1, 21:9, 2.39:1 (or their portrait forms), by ratio."},{"name":"orientation","label":"Orientation","type":"string","decimals":4,"description":"landscape, portrait or square."},{"name":"scaled_height","label":"Height at new width","type":"number","decimals":2,"description":"new_width × height / width (only when new_width is given)."},{"name":"scaled_width","label":"Width at new height","type":"number","decimals":2,"description":"new_height × width / height (only when new_height is given)."}],"input_schema":{"type":"object","properties":{"width":{"description":"Width in any unit (pixels, cm …).","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[1920]},"height":{"description":"Height in the same unit.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[1080]},"new_width":{"description":"Optional target width; the matching height is returned as scaled_height.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[1280]},"new_height":{"description":"Optional target height; the matching width is returned as scaled_width.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[1440]}},"additionalProperties":false,"required":["width","height"]},"output_schema":{"type":"object","properties":{"ratio":{"description":"Simplest integer ratio width:height (values with decimals are scaled to integers first).","type":"string"},"ratio_decimal":{"description":"width / height.","type":"number"},"closest_common_ratio":{"description":"Nearest of 1:1, 5:4, 4:3, 3:2, 16:10, 16:9, 1.85:1, 2:1, 21:9, 2.39:1 (or their portrait forms), by ratio.","type":"string"},"orientation":{"description":"landscape, portrait or square.","type":"string"},"scaled_height":{"description":"new_width × height / width (only when new_width is given).","type":"number"},"scaled_width":{"description":"new_height × width / height (only when new_height is given).","type":"number"}}},"formula":"ratio = (width / g) : (height / g) with g = gcd(width, height); ratio_decimal = width / height; scaled_height = new_width × height / width; scaled_width = new_height × width / height","sources":[{"name":"Aspect ratio (image) (Wikipedia)","url":"https://en.wikipedia.org/wiki/Aspect_ratio_(image)","type":"reference","retrieved_at":"2026-09-23"},{"name":"Display aspect ratio (Wikipedia)","url":"https://en.wikipedia.org/wiki/Display_aspect_ratio","type":"reference","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"1920 × 1080, resize to width 1280","inputs":{"width":1920,"height":1080,"new_width":1280},"expected":{"ratio":"16:9","ratio_decimal":1.7778,"closest_common_ratio":"16:9","orientation":"landscape","scaled_height":720},"url":"https://tttkmbb.com/api/v1/calculate/aspect-ratio?width=1920&height=1080&new_width=1280"},{"name":"1080 × 1350 portrait, resize to height 675","inputs":{"width":1080,"height":1350,"new_height":675},"expected":{"ratio":"4:5","ratio_decimal":0.8,"closest_common_ratio":"4:5","orientation":"portrait","scaled_width":540},"url":"https://tttkmbb.com/api/v1/calculate/aspect-ratio?width=1080&height=1350&new_height=675"}],"faq":[{"q":"Why is my 1366 × 768 screen shown as 683:384 and not 16:9?","a":"683:384 is the exact simplified ratio (1.7786); it is only approximately 16:9 (1.7778), which is why closest_common_ratio is reported separately."},{"q":"Scaled dimensions are not whole pixels. What should I do?","a":"Round to the nearest integer (or to an even number for video codecs); the tiny change in ratio is invisible."}],"tags":["aspect ratio","16:9","resize image keep ratio","screen ratio","ratio calculator"],"related":[{"calculator_id":"ratio","reason":"General ratio simplification and scaling."},{"calculator_id":"rectangle","reason":"Area and diagonal of the frame."}],"links":{"html":"https://tttkmbb.com/everyday/aspect-ratio","markdown":"https://tttkmbb.com/everyday/aspect-ratio.md","json":"https://tttkmbb.com/everyday/aspect-ratio.json","api":"https://tttkmbb.com/api/v1/calculate/aspect-ratio","schema":"https://tttkmbb.com/api/v1/calculators/aspect-ratio","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:30:47Z"}