Context Window Calculator
See whether your text fits a model context window, and how much room is left.
Find the right resolution for SDXL, FLUX, DALL-E or Midjourney at any aspect ratio.
The AI Image Size Calculator finds the best generation resolution for SDXL, SD 1.5, FLUX, DALL-E and Midjourney at any aspect ratio, then gives the crop to the exact ratio and the final size after upscaling.
Image models are trained at particular sizes, and asking for anything else is how you get two heads, repeated subjects and stretched faces. SDXL was trained on a set of roughly one-megapixel buckets, SD 1.5 on 512 pixels, DALL-E accepts a short list of sizes, FLUX wants both sides divisible by 16, and Midjourney takes a ratio rather than pixels.
Choose the model and the aspect ratio the image is for — 16:9 for YouTube, 9:16 for stories, 4:5 for Instagram, 1.91:1 for link previews, or a custom ratio or final pixel size — and the calculator returns the best size to generate at, how far it is from your ratio, and every size the model is comfortable with, ranked by closeness.
Because the closest trained size is rarely exact, it also gives the crop that turns the generated frame into your precise ratio and the final dimensions after a 1.5, 2 or 4 times upscale — the full path from render to finished image. For Midjourney it writes the --ar value to add to your prompt.
SDXL buckets, SD 1.5 sizes, FLUX multiples of 16, DALL-E fixed sizes and Midjourney ratios.
Every supported size is listed with how far it is from your ratio.
The exact crop and final dimensions after a 1.5, 2 or 4 times upscale.
YouTube, stories, Instagram, link previews, headers and custom sizes.
The correct whole-number aspect ratio parameter for your prompt.
SDXL, SD 1.5, FLUX, DALL-E or Midjourney. Each has different native sizes.
Pick where the image will be used, or type a custom ratio or final size.
Choose the upscale you plan to apply with hires fix or an upscaler.
Render at the suggested size, crop to the exact ratio, then upscale.
SDXL was trained on buckets of about one megapixel, including 1024x1024, 1152x896, 1216x832, 1344x768 and 1536x640, plus their portrait versions. Sizes far from these produce more artefacts.
1344x768 is the closest trained bucket. It is a 1.75 ratio, so crop slightly to reach exactly 16:9, then upscale.
The model fills the extra space with patterns it learned at its training size, which often means repeating the subject. Generate at a native size and upscale instead.
A fixed set: 1024x1024 square, 1792x1024 landscape and 1024x1792 portrait. Other shapes need cropping afterwards.
With the --ar parameter, such as --ar 16:9. Midjourney chooses the pixel dimensions for that ratio.
What people who use the AI Image Size Calculator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the AI Image Size Calculator. It takes half a minute and no account.
Write the first reviewSee whether your text fits a model context window, and how much room is left.
Build a structured system prompt for a chatbot, assistant or custom GPT.
Generate MCP server config for Claude Desktop, Claude Code, Cursor, VS Code and Windsurf.
Work out how much GPU memory a local LLM needs to run or fine-tune.
Scan untrusted text for prompt injection patterns and hidden characters before a model reads it.
Write valid tool-calling JSON schemas without hand-editing braces.
Read the prompt, seed and settings saved inside an AI-generated PNG.
Strip markdown, smart quotes and invisible characters out of generated text.