Nano Banana 2.1 cost calculator in Python: tokens per image, 2 tiers

A 23-line Python calculator for Nano Banana 2.1 cost from Google's token counts (1,120, 1,680, 3,780) and rates, with standard and batch tiers and input tokens.

4 min readSume
All posts

Google bills Nano Banana 2.1 images by output tokens: 1,120 at 1K, 1,680 at 2K and 3,780 at 4K, at $30 per 1M on Standard and $15 on Batch. The script below multiplies those by the listed rates and adds input and text tokens, so you can price a job before you run it. It uses only the standard library.

The calculator

Rates are Google list prices on the paid tier, read October 7, 2026. Change the dictionary when Google changes the page.

TOKENS = {"1K": 1120, "2K": 1680, "4K": 3780}
RATES = {  # USD per 1M tokens, Google list, read 2026-10-07
    "standard": {"image": 30.00, "input": 1.50, "text": 7.50},
    "batch": {"image": 15.00, "input": 0.75, "text": 3.75},
}


def cost(images, size, tier="standard", input_tokens=0, text_tokens=0):
    r = RATES[tier]
    per_image = (
        TOKENS[size] * r["image"]
        + input_tokens * r["input"]
        + text_tokens * r["text"]
    ) / 1_000_000
    return images * per_image


if __name__ == "__main__":
    for size in TOKENS:
        std = cost(1000, size)
        bat = cost(1000, size, "batch")
        print(f"{size}: 1,000 images standard ${std:,.2f}, batch ${bat:,.2f}")
    print(f"2K edit, 6,000 input tokens: ${cost(1, '2K', input_tokens=6000):.4f}")

What it prints

Running the file gives these totals for 1,000 images with no input or text tokens, and one 2K edit that sends 6,000 input tokens.

Output of the calculator with Google list rates (read 2026-10-07)
CaseStandardBatch
1,000 images at 1K$33.60$16.80
1,000 images at 2K$50.40$25.20
1,000 images at 4K$113.40$56.70
One 2K edit, 6,000 input tokens$0.0594-

Limits of the arithmetic

  • Search grounding is not in the function. It is billed per query after 5,000 free a month.
  • Count input tokens from a real response, because Google's page does not give a token count per input image.
  • This is Google's price. Sume bills its own per-image price from usage.cost, so use the Sume endpoint pricing lines for Sume budgets.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume