Image Token Calculator

Upload an image to calculate vision input tokens and estimated API cost. OpenAI is selected by default.

Drop an image hereorPNG, JPG, WebP, or non-animated GIF up to 20 MB.
Choose an image to calculate its input tokens.

Your image stays in this browser. StackLens reads its dimensions locally and does not upload it.

The calculation covers image input tokens only. Text prompts, message formatting, tools, output tokens, and provider-side changes can affect billed usage.

View calculation sources
How StackLens verifies data and calculates cost

OpenAI image input rulesHigh confidenceChecked 2026-07-19

OpenAI documents patch-based image counting for current models and base-plus-tile budgets for GPT-4o models.

Claude vision token rulesHigh confidenceChecked 2026-07-19

Anthropic documents visual patch sizing, image resizing limits, and model-level visual token budgets.

Gemini image token rulesHigh confidenceChecked 2026-07-19

Google documents the fixed image token budget for small images and the tile rule used for larger images.

FAQ

Image token questions

Does StackLens upload my image?

No. The calculator reads the image dimensions in your browser. The image file is not uploaded to StackLens.

Are image tokens the same across OpenAI, Claude, and Gemini?

No. Each provider applies its own patch, tile, resizing, and detail rules. Choose the provider and model you plan to call.

Does the estimate include prompt and output tokens?

No. The result covers the image input only. Text instructions, message formatting, tools, generated output, and other request fields can add billed tokens.

Why can two OpenAI models return different image token counts?

OpenAI model families can use different image counting methods and token multipliers. The calculator applies the documented rule for the selected model.