{"uid":"cap_MJLSU-4DX6etWPtedCSdA","slug":"photography-depth-of-field-calculator-eb36334b","name":"Photography Depth of Field Calculator","description":"Depth of field from focal length, aperture, distance and sensor: near and far limits, total depth and hyperfocal distance.","url":"https://photo-calc.x402tookit.com/depth-of-field?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["focalMm","aperture","distanceM"],"properties":{"cocMm":{"type":"number","description":"Circle of confusion in mm (default sensor diagonal / 1500)"},"sensor":{"type":"string","description":"full-frame (default), aps-c, aps-c-canon, aps-h, micro-four-thirds, 1-inch or medium-format-44x33"},"focalMm":{"type":"number","description":"Actual focal length in mm"},"aperture":{"type":"number","description":"f-number"},"distanceM":{"type":"number","description":"Focus distance in metres"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"cocMm":{"type":["null","number"]},"sensor":{"type":["null","string"]},"source":{"type":["null","string"]},"focalMm":{"type":["null","number"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"aperture":{"type":["null","number"]},"degraded":{"type":["boolean","null"]},"farLimitM":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"nearLimitM":{"type":["null","number"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"hyperfocalM":{"type":["null","number"]},"totalDepthM":{"type":["null","number"]},"behindSubjectM":{"type":["null","number"]},"focusDistanceM":{"type":["null","number"]},"inFrontOfSubjectM":{"type":["null","number"]},"nearAtHyperfocalM":{"type":["null","number"]},"farLimitIsInfinity":{"type":["boolean","null"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QpgcOPw1Hnq52wHYyIvnj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates near/far focus limits, total depth of field, and hyperfocal distance from focal length, aperture, focus distance, and sensor type.","exampleAgentPrompt":"Calculate the depth of field for a 85mm lens at f/2.0, focused at 1.5 metres, on a full-frame sensor — give me the near and far focus limits and the hyperfocal distance.","exampleUseCases":[{"title":"Portrait lens focus range check","prompt":"I'm shooting portraits with a 85mm lens at f/1.8 on my full-frame camera, focused at 1.2 metres. What's the depth of field — how close and far from my subject will still be sharp, and what's the hyperfocal distance?"},{"title":"Landscape hyperfocal planning","prompt":"For a 24mm lens at f/11 on a full-frame sensor, focused at 5 metres, can you tell me the near and far limits of acceptable sharpness and the hyperfocal distance so I know where to focus for maximum depth of field?"},{"title":"Micro four thirds shallow depth","prompt":"I'm using a 25mm lens at f/2.0 on a Micro Four Thirds camera, focused at 3 metres. What's the total depth of field, the near and far limits, and is the far limit infinity?"}],"resultDescription":"Returns near focus limit (m), far focus limit (m), total depth of field (m), hyperfocal distance (m), depth in front of subject (m), depth behind subject (m), near limit at hyperfocal distance (m), a boolean for whether the far limit reaches infinity, plus the input parameters echoed back (focal length, aperture, focus distance, sensor, circle of confusion) and a summary string.","failureModes":["Missing required parameter (focalMm, aperture, or distanceM) returns an error","Invalid sensor name returns an error or uses default","Zero or negative focal length / aperture / distance produces invalid results","Very large focus distances cause far limit to be infinity — flagged via farLimitIsInfinity","Unsupported sensor string falls back to full-frame default"],"whenToPreferThis":"Use this endpoint when you need precise optical depth-of-field calculations including hyperfocal distance, near/far limits, and sensor-aware circle-of-confusion — especially when supporting photographers planning shots, building camera tools, or automating focus decisions. Prefer this over generic optics formulas when you need ready-made sensor presets (full-frame, APS-C, micro four thirds, etc.) and structured JSON output without coding the optics math yourself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T06:40:41.621Z","isFirstParty":false,"canonicalSlug":"photography-depth-of-field-calculator-eb36334b"}