Technology / Cloud & AI costs
Cost per useful outcome

Model the bill before the usage graph surprises you.

Combine AI tokens, requests, compute, storage and egress into unit economics and a growth scenario.

API
Estimated monthly infrastructure bill
$1,780
AI input$360
AI output$420
Cloud baseline$900
Cost / active user$0.18
At 2× users with the same behavior, the bill is about $2,660—not exactly 2× because baseline costs stay fixed.

How to use this tool

Direct answer

Monthly cost = hourly rate × hours per day × days per month. A $0.10/hour instance running continuously is about $73 a month, or $876 a year.

Software costs money in two currencies: dollars on an invoice and engineering capacity you have to plan around. Both are here — the monthly bill for a cloud instance, the real cost of an LLM API at your call volume, which image plan is worth it, plus the sizing questions that decide whether the bill stays sane: database connections, algorithmic cost at scale, and what a codebase of this size actually represents in person-months.

What the answer includes

  • Monthly and annual cost at your hourly rate
  • What a one- or three-year reservation typically saves
  • What running it only during business hours would cost
  • The cost per hour of actual uptime

What can change it

  • Informational estimate. Actual rates, fees and terms depend on the provider and your contract; compare official pricing documents before deciding. Cloud and AI list prices change frequently — the price fields here are editable on purpose, so put your own current figures in them.
  • Compute is only part of a cloud bill. Storage, snapshots, load balancers, NAT gateways, IP addresses and above all data transfer out are billed separately, and egress in particular is where surprise invoices come from.
  • A reservation or savings plan typically cuts 40–60% off on-demand pricing, but it is a commitment — you pay whether the instance runs or not. Only commit to the baseline you are certain of, and leave the variable part on-demand or spot.
  • Non-production environments are the easiest saving available. A development server that runs 24/7 but is used 40 hours a week is roughly 76% waste; scheduling it off outside working hours costs nothing to implement.

Deadline or next step: Set a billing alert at your expected monthly figure before you launch anything, not after the first surprise invoice.

Answer supported by: Amazon Web Services · Amazon Web Services

Prices change constantly, so every rate below is editable — put your provider’s current numbers in. Only the fields your case needs get read.

Last reviewed:

Responsible editor:

Formula and sources verified. Educational guidance only. It does not replace qualified professional advice.

Editorial policyMethodology

Frequently asked questions

How much does a cloud server cost per month?

Multiply the hourly rate by the hours per day and the days per month. A modest instance at $0.10 an hour running continuously is roughly $73 a month, or $876 a year. That covers compute only — storage, snapshots, load balancers and especially outbound data transfer are billed on top, and egress is where most unexpectedly large invoices come from.

How much do reserved instances actually save?

Typically 40–60% against on-demand, with the deepest discounts on three-year commitments paid up front. The catch is that you pay for the reservation whether the instance runs or not, so it only makes sense for baseline capacity you are confident about. Keep the variable portion on-demand or on spot pricing.

What is the easiest way to cut a cloud bill?

Turn off what nobody is using. Development and staging environments that run around the clock but are used forty hours a week are about 76% waste, and scheduling them off outside working hours is nearly free to implement. After that, look at unattached storage volumes, old snapshots, idle load balancers and NAT gateways — all of them bill continuously and none of them are visible in normal use.

How do I calculate the cost of an LLM API call?

Multiply input tokens by the input price and output tokens by the output price, then divide by a million, because that is the unit providers bill in. At $3 per million input and $15 per million output, a call with 2,000 input and 500 output tokens costs $0.0135 — which at a thousand calls a day is about $405 a month.

Why is my LLM bill higher than I estimated?

Almost always output tokens. They typically cost around five times what input tokens cost, so a model that answers at length dominates the bill even when the prompt is short. Conversational systems compound this by resending the whole history as input on every turn, which grows quadratically over a long session. Measure real token counts from the API responses rather than estimating them.

What is the cheapest way to reduce LLM costs?

Ask for shorter answers, and check whether your provider offers prompt caching and batch endpoints — caching a long shared system prompt can cut input cost by an order of magnitude, and batch processing is typically half price for anything that does not need to be real time. Routing simple steps to a smaller model usually saves more than any prompt tuning.

Which image-generation plan is worth it?

The mid tier at around $30 a month is the usual answer, because it is the cheapest one that includes unlimited relax-mode generation. That removes the hard ceiling entirely: you wait longer per image but never run out. The cheapest tier caps you at a fixed number of images, which most people exhaust in the first week and then find themselves paying for extra time anyway.

How many database connections should my pool have?

Roughly one to three per CPU core, depending on how much the workload waits on I/O. More is usually worse: past that point the database spends its time context-switching and contending rather than answering queries. Critically, the pool size is per application instance, so ten containers with 20 connections each is 200 connections at the server.

When do I need PgBouncer or another connection pooler?

Once the total across all your application instances approaches a couple of hundred connections, or as soon as you are running serverless functions that each open their own. An external pooler multiplexes many client connections onto a small number of real database sessions, which is far cheaper than raising the server’s connection limit and buying RAM to support the idle ones.

How long does an O(n²) algorithm take on a million items?

About 16 minutes at a billion operations per second, against roughly 20 milliseconds for an O(n log n) approach on the same data. That factor of fifty thousand is why complexity class matters far more than micro-optimisation at scale — and why the same code that felt instant on a thousand test records becomes unusable in production.

Is Big-O a reliable predictor of real runtime?

It predicts how cost grows, not how fast something runs. Constant factors hidden inside the notation can differ by a hundredfold, cache behaviour often matters more than operation count, and at small n a "worse" algorithm frequently wins — which is why production sort implementations switch to insertion sort below a threshold. Use it to choose an approach, then profile the real thing.

How many person-months does 50,000 lines of code represent?

Around 150 person-months by the basic COCOMO organic model, which is 2.4 × KLOC^1.05. With a team of four that is roughly 37 months of calendar time. The exponent above one is the interesting part: effort grows faster than size, because coordination cost rises as the system grows.

Is lines of code a useful measure at all?

Only as a rough scale indicator, and never as a measure of anyone’s productivity. Identical functionality can differ fivefold in line count between languages, the best solution is often the one that deletes code, and any team measured on lines written will reliably produce more lines. Use it to tell a 5,000-line project from a 500,000-line one, and nothing finer than that.

Editorial transparency

Who is responsible for this page

Editorial status explained in methodology
Author and responsible editorFounder and responsible editor of Hacé Cuentas.
How it is checkedAuthorship and methodology are explained on our editorial pages.
Sources and methodThis page explains its assumptions and limitations.View methodology →

Choose your situation

Main query:Cloud Server, LLM Token, Midjourney, Database Pool and Engineering Effort Cost Calculator

What do you want to solve?

Related tools in other countries and languages

Check the language, units and assumptions of each tool.