Image token calculator
How many tokens an image costs on each vision model, the size the provider resizes it to, and what a batch of requests costs — computed in your browser.
What it does
Give an image's size, or open the image itself and let the calculator read its size. For every vision model Salyro publishes, it shows:
- the size the provider resizes the image to;
- how many tokens the image costs;
- what the requests you describe cost, images per request times requests.
For the model you choose, it also draws the grid of patches the model sees. When you open a file, only its width and height are read, in your browser. The image is not uploaded, kept or put in a link.
How it counts
Anthropic documents the formula exactly, and the calculator follows it:
- Claude sees an image in patches of 28 × 28 pixels, and each patch is one visual token. An image costs
⌈width / 28⌉ × ⌈height / 28⌉tokens. - Each model has a resolution tier:
- Standard: 1568 px on the long edge and 1568 tokens.
- High-resolution, for Claude 4.7 and later: 2576 px and 4784 tokens.
- A larger image is resized to the largest size that fits both limits, keeping its aspect ratio. The calculator uses the reference implementation from Anthropic's page, then pads the image to whole patches.
- The limits the page states are checked: 8000 × 8000 px at most, and 100 or 600 images per request depending on the model. With more than 20 images in a request, a stricter per-image limit applies, and the page advises keeping each side at 2000 px or less.
Salyro's own limit: through Salyro, one request carries at most 20 images, whatever the provider allows. A request with more is refused with a 400 before it reaches the provider, and the calculator says so.
Detail: detail (auto, low or high) is OpenAI's setting for an image. Salyro forwards it as it is and does not act on it. Anthropic's pages document no detail level, so it does not change a Claude count.
OpenAI, Google Gemini and xAI: their pages on image input could not be read when this tool was built. Their image cost is shown as unknown, not worked out from a formula remembered from elsewhere.
The cost: image tokens are billed as input. The calculator prices them with Salyro's own cost arithmetic, on today's price list, with each request priced on its own. The cost covers the images alone, not the text of the prompt or the answer.
What it does not know
- Other providers' formulas, as above.
- The text that goes with the image, and the answer's output tokens.
- Anthropic's own rounding: the page's table gives 2000 × 1500 as 1269 × 952, while its reference implementation, which the calculator follows, gives 1270 × 952. Both come to 1564 tokens.
FAQ
Why does a 4K screenshot cost the same as a 1920 × 1080 one on some models?
On the standard tier, both are resized to fit 1568 visual tokens, so both cost the same once resized. On a high-resolution model, the 4K image keeps more detail and costs up to three times as much.
Should I resize images before sending them?
Resizing to the size the model sees costs nothing in tokens and sends fewer bytes. The Image Prep tool does it in your browser.
Sources
The formula, the tiers, the resize and the limits quote Anthropic's vision page and its page on coordinates and resizing, on platform.claude.com. Every fact is recorded as Reference Data, with its date, and listed in the public tools' data freshness report.
Where the numbers come from
- Model and pricing data is a snapshot of the catalogue Salyro itself uses, taken when this site was built.
- Facts about models and providers that are not in that catalogue carry their own source and the date they were checked, and are shown as unknown where no reliable source exists.
