Stable Diffusion Cost Calculator
Estimate the compute cost of generating images with a Stable Diffusion model.
About Stable Diffusion Cost Calculator
Stable Diffusion inference cost scales with both output resolution and the number of denoising sampling steps, since both increase the GPU compute required per image. This calculator applies resolution and step multipliers to a baseline 512px/20-step cost to estimate the real cost of larger or higher-fidelity batches. Self-hosted GPU costs and hosted API pricing (e.g. Stability AI, Replicate) can both be modeled by adjusting the base cost per image.
Formula
total_cost = images × base_cost_per_image × resolution_factor × (steps / 20)
- images
- Number of images to generate
- base_cost_per_image
- Cost per image at 512px and 20 steps
- resolution_factor
- Multiplier based on output resolution
- steps
- Number of denoising sampling steps
Worked example
With the default values below, Stable Diffusion Cost Calculator returns Total Cost of $0.2000. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Number of Imagesaccepts 1–1,000,000 images
- 100 images
- Base Cost per Image (512px, 20 steps)accepts 0–10 $/image
- 0.002 $/image
- Resolutionone of 512×512, 768×768, 1024×1024, 2048×2048
- 512×512
- Sampling Stepsaccepts 1–200 steps
- 20 steps
Results
- Total Cost
- $0.2000
- Effective Cost per Image
- $0.002000
- Resolution Multiplier
- 1.00
- Steps Multiplier
- 1.00
Step by step
- 1Resolution factor (relative to 512px)= 1×
- 2Steps factor (relative to 20 steps)= 1.00×
- 3Effective cost per image= $0.002000
- 4Total cost= $0.2000
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax or compounding frequency into account.
- Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why does resolution affect cost so much?
Diffusion models operate on a latent grid proportional to image dimensions, so compute (and cost) scales roughly with the square of resolution, not linearly.
Does more sampling steps always improve quality?
Quality gains diminish after 20-30 steps for most samplers (e.g. DPM++), so doubling steps rarely doubles perceived quality — but it does roughly double cost.
How do I model my own GPU's hosting cost?
Divide your GPU's hourly rental cost by the number of 512px/20-step images it can generate per hour to get a base cost per image, then enter that here.
