Skip to content
Agentic AI Builder's Guide

Search every lesson, prompt, glossary term and troubleshooting topic. Use ↑ ↓ to move and Enter to open.

Cost Calculator

Understand AI subscription, runtime API, hosting and database costs, and how to estimate them before you build.

Full printable guide

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

CategoryBilled forTypical billing modelOfficial source
AI development subscriptionsYour use of ChatGPT and Claude while buildingMonthly plan per person, with usage limitsOpenAI and Anthropic pricing pages
Application runtime API costsYour deployed app calling AI or other paid APIs for usersPer request or per tokenEach API provider's pricing page
HostingRunning your application serviceUsage-based compute, memory and networkRailway pricing
DatabasesDatabase services and storageUsage and storage-basedRailway pricing
DomainCustom domain registrationAnnual feeYour 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.

Development (monthly)

Your planning and review assistant plan

Plan or API usage for the engineering agent

Operational (monthly)

Compute, memory and network for your app

Database services and storage

AI APIs your deployed app calls for users

Email, payments, monitoring and similar

Anything else billed monthly

Annual fee; spread across 12 months in totals

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 month

The 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.