Cost Calculator
Understand AI subscription, runtime API, hosting and database costs, and how to estimate them before you build.
Building and running an AI-assisted application involves several separate costs. This page explains each category and includes an interactive calculator to estimate your own monthly and annual totals. Calculations run entirely in your browser using ordinary, deterministic code — no AI and no network requests.
The five cost categories
| Category | Billed for | Typical billing model | Official source |
|---|---|---|---|
| AI development subscriptions | Your use of ChatGPT and Claude while building | Monthly plan per person, with usage limits | OpenAI and Anthropic pricing pages |
| Application runtime API costs | Your deployed app calling AI or other paid APIs for users | Per request or per token | Each API provider's pricing page |
| Hosting | Running your application service | Usage-based compute, memory and network | Railway pricing |
| Databases | Database services and storage | Usage and storage-based | Railway pricing |
| Domain | Custom domain registration | Annual fee | Your registrar |
Development subscriptions versus runtime API costs
This distinction matters most:
- Development subscriptions are what you pay to use AI tools while building. They do not grow with your users.
- Runtime API costs are what your application incurs each time it calls an API on behalf of users. They grow with usage and can rise quickly if a feature becomes popular or is abused.
An application that does not call any AI API at runtime has zero runtime AI cost, regardless of how it was built. This guide itself is an example: it was designed to use no external AI APIs and no paid runtime integrations.
Interactive calculator
Enter your expected monthly costs for each category, plus your annual domain fee. The calculator separates development costs (the tools you use to build) from operational costs (what it takes to run the application for users), and shows a breakdown by category.
Monthly cost estimator
Showing illustrative example values — not current vendor prices. Replace them with figures from each vendor's official pricing page. Amounts use a generic currency symbol; enter values in any single currency.
- Monthly total
- $91.67
- Annual total
- $1,100.04
- Development / month
- $50.00
- Operational / month
- $41.67
Breakdown by category (monthly)
- ChatGPT subscription · development$25.00
- Claude Code subscription or usage · development$25.00
- Railway application hosting · operational$10.00
- Database hosting · operational$10.00
- Application AI API usage · operational$15.00
- External services · operational$5.00
- Other expenses · operational$0.00
- Domain registration (annual ÷ 12) · operational$1.67
Totals are deterministic sums. Development costs usually stay flat; operational costs — especially runtime AI API usage — grow with your users.
How the calculator works:
- Empty fields count as zero. Invalid or negative values are flagged and counted as zero.
- The domain fee is entered annually and divided by 12 in monthly totals.
- Annual total = monthly total × 12.
- Inputs are saved only in your browser. Use Reset to example values to start again.
Estimating cost per AI request
For token-billed AI APIs:
cost per request = (input tokens ÷ 1,000,000 × input price per million tokens)
+ (output tokens ÷ 1,000,000 × output price per million tokens)Measure real token counts from test requests rather than guessing. Prices differ by model, so the model you choose has a large effect.
Illustrative example
The following uses made-up placeholder numbers purely to show the arithmetic. They are not real prices.
Runtime AI feature: summarize a task description
Requests per user per month = 20
Active users = 500
Cost per request (placeholder)= 0.002
B = 20 × 500 × 0.002 = 20.00 per month
If usage grows to 5,000 active users:
B = 20 × 5,000 × 0.002 = 200.00 per monthThe example shows why runtime costs need monitoring: they scale linearly with users, while subscriptions do not.
Reducing costs
- Avoid runtime AI where conventional code works. Calculations, validation, sorting and formatting should use ordinary code — free, exact and repeatable.
- Cache results of expensive calls and store generated content instead of regenerating it.
- Rate limit per user and set spending limits and alerts with every API provider.
- Choose the smallest adequate model for each runtime task.
- Skip the database if you do not need one; remove unused services.
- Use private networking between Railway services.
- Use LOW GAS, consolidated prompts during development to stretch subscription usage limits.