{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"megapixels-print-size"},"result":{"entity_type":"calculator","id":"megapixels-print-size","calculator_id":"megapixels-print-size","canonical_url":"https://tttkmbb.com/photography/megapixels-print-size","name":"Megapixels to Print Size Calculator","title":"Megapixels to Print Size Calculator – Maximum Print Dimensions at a Given DPI","category":"photography","category_name":"Photography & Optics","tool_name":"calculate_print_size_from_megapixels","featured_mcp_tool":false,"description":"Computes the megapixel count and aspect ratio of an image from its pixel dimensions and the print size it yields at a chosen resolution in dots per inch, with a table for 150, 200, 240 and 300 dpi.","use_when":"You want to know how large a photo can be printed at a given quality, or how many megapixels a camera needs for a print size.","do_not_use_when":"You need a screen's pixel density (use screen-ppi) or the storage size of the image file (use image-file-size).","inputs":[{"name":"width_px","label":"Image width","type":"integer","unit":"px","required":true,"min":1,"max":1000000,"description":"Image width in pixels.","example":6000},{"name":"height_px","label":"Image height","type":"integer","unit":"px","required":true,"min":1,"max":1000000,"description":"Image height in pixels.","example":4000},{"name":"dpi","label":"Print resolution","type":"number","unit":"dpi","required":false,"default":300,"min":10,"max":4800,"description":"Pixels per inch of the print: 300 for gallery quality, 240 for typical inkjet, 150 for large prints viewed from a distance.","example":300}],"outputs":[{"name":"megapixels","label":"Megapixels","type":"number","unit":"MP","decimals":2,"description":"width_px × height_px / 1 000 000."},{"name":"print_width_in","label":"Print width","type":"number","unit":"in","decimals":2,"description":"width_px / dpi."},{"name":"print_height_in","label":"Print height","type":"number","unit":"in","decimals":2,"description":"height_px / dpi."},{"name":"print_width_cm","label":"Print width (cm)","type":"number","unit":"cm","decimals":2,"description":"Print width × 2.54."},{"name":"print_height_cm","label":"Print height (cm)","type":"number","unit":"cm","decimals":2,"description":"Print height × 2.54."},{"name":"aspect_ratio","label":"Aspect ratio","type":"string","decimals":4,"description":"Reduced width:height ratio, e.g. '3:2' or '4:3'; unusual sizes also show the nearest common ratio, e.g. '376:251 (≈ 3:2)'."},{"name":"aspect_ratio_decimal","label":"Aspect ratio (decimal)","type":"number","decimals":3,"description":"width_px / height_px."},{"name":"sizes_table","label":"Print size by resolution","type":"object","decimals":4,"description":"Print width × height in inches at 150, 200, 240 and 300 dpi."}],"input_schema":{"type":"object","properties":{"width_px":{"description":"Image width in pixels. Unit: px.","type":"integer","minimum":1,"maximum":1000000,"examples":[6000],"x-unit":"px"},"height_px":{"description":"Image height in pixels. Unit: px.","type":"integer","minimum":1,"maximum":1000000,"examples":[4000],"x-unit":"px"},"dpi":{"description":"Pixels per inch of the print: 300 for gallery quality, 240 for typical inkjet, 150 for large prints viewed from a distance. Unit: dpi.","type":"number","minimum":10,"maximum":4800,"default":300,"examples":[300],"x-unit":"dpi"}},"additionalProperties":false,"required":["width_px","height_px"]},"output_schema":{"type":"object","properties":{"megapixels":{"description":"width_px × height_px / 1 000 000. Unit: MP.","type":"number","x-unit":"MP"},"print_width_in":{"description":"width_px / dpi. Unit: in.","type":"number","x-unit":"in"},"print_height_in":{"description":"height_px / dpi. Unit: in.","type":"number","x-unit":"in"},"print_width_cm":{"description":"Print width × 2.54. Unit: cm.","type":"number","x-unit":"cm"},"print_height_cm":{"description":"Print height × 2.54. Unit: cm.","type":"number","x-unit":"cm"},"aspect_ratio":{"description":"Reduced width:height ratio, e.g. '3:2' or '4:3'; unusual sizes also show the nearest common ratio, e.g. '376:251 (≈ 3:2)'.","type":"string"},"aspect_ratio_decimal":{"description":"width_px / height_px.","type":"number"},"sizes_table":{"description":"Print width × height in inches at 150, 200, 240 and 300 dpi.","type":"object"}}},"formula":"megapixels = width_px × height_px / 10⁶; print_width_in = width_px / dpi; print_height_in = height_px / dpi; cm = in × 2.54","method":"Assumes no cropping or resampling; 300 dpi corresponds to the eye's resolution at about 25–30 cm viewing distance, and large prints viewed from farther away look sharp at 150–200 dpi.","sources":[{"name":"Wikipedia – Dots per inch","url":"https://en.wikipedia.org/wiki/Dots_per_inch","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Image resolution","url":"https://en.wikipedia.org/wiki/Image_resolution","type":"reference","retrieved_at":"2026-09-24"}],"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":"24 MP (6000 × 4000) at 300 dpi","inputs":{"width_px":6000,"height_px":4000,"dpi":300},"expected":{"megapixels":24,"print_width_in":20,"print_height_in":13.33,"print_width_cm":50.8,"print_height_cm":33.87,"aspect_ratio":"3:2"},"url":"https://tttkmbb.com/api/v1/calculate/megapixels-print-size?width_px=6000&height_px=4000&dpi=300"},{"name":"12 MP phone (4032 × 3024) at 240 dpi","inputs":{"width_px":4032,"height_px":3024,"dpi":240},"expected":{"megapixels":12.19,"print_width_in":16.8,"print_height_in":12.6,"aspect_ratio":"4:3"},"url":"https://tttkmbb.com/api/v1/calculate/megapixels-print-size?width_px=4032&height_px=3024&dpi=240"}],"faq":[{"q":"Is dpi the same as ppi?","a":"For this calculation yes: it is the number of image pixels per inch of print. Printer 'dpi' figures like 1440 or 2880 refer to ink droplets and are not the image resolution."},{"q":"Can I print larger than the 300 dpi size?","a":"Yes, resolution only needs to match viewing distance: a print viewed from 1 m looks sharp at about 100 dpi, so a 24 MP file makes a 60 × 40 in print for wall viewing."}],"tags":["megapixels","print size","dpi","ppi","photo print resolution","aspect ratio"],"related":[{"calculator_id":"screen-ppi","reason":"Pixel density of a display from its resolution and diagonal."},{"calculator_id":"aspect-ratio","reason":"Aspect-ratio arithmetic for resizing and cropping."},{"calculator_id":"image-file-size","reason":"Storage size of the same image."}],"links":{"html":"https://tttkmbb.com/photography/megapixels-print-size","markdown":"https://tttkmbb.com/photography/megapixels-print-size.md","json":"https://tttkmbb.com/photography/megapixels-print-size.json","api":"https://tttkmbb.com/api/v1/calculate/megapixels-print-size","schema":"https://tttkmbb.com/api/v1/calculators/megapixels-print-size","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T03:48:18Z"}