PostgreSQL total cost calculator
Estimate PostgreSQL costs from query load, storage growth, replicas, WAL retention, recovery objectives, migration and ongoing operation.
Last updated
In short
- Data size alone does not size a database: query load, IO and peaks matter.
- Replication, backup and point-in-time recovery solve different problems.
- Keep application tuning and migration effort separate from database hosting.
On this page (5)
Costs and savings · Part of PostgreSQL
Interactive worksheet · no sign-up
Estimate PostgreSQL costs
Use the same currency and scope for both options. Inputs stay in this page; they are not included in analytics or sent with an enquiry.
- Current total over selected horizon
- Replacement total, including transition
- Invoice saving over selected horizon
- Economic saving, also valuing internal time
- Simple payback from start
Negative savings mean the replacement costs more under these assumptions. Positive savings do not establish equivalent features, capacity or service levels.
How the calculation works
- Current monthly invoices = billed units × unit price + additional current spend.
- Replacement monthly invoices = Pilae management + additional infrastructure + target licences + workload usage + retained services.
- Transition = plan onboarding + new hardware + extra migration + training + parallel months × max(0, current invoices − retained services). Parallel months are capped at the comparison horizon.
- Total invoices = monthly invoices × horizon, plus transition for the replacement. Payback uses the full transition commitment divided by positive monthly invoice saving, including all entered overlap months even beyond the selected horizon.
- Economic saving adds the change in valued internal operating time. It does not assume headcount reduction.
Business includes up to 3 apps, then a published per-app fee (CHF 390 in CHF). Starter’s published CHF price is CHF 449/month. All Pilae figures come from the same price data as the pricing page. Workload inputs are your estimates, not supplier quotes. Taxes, price growth, discount rates, opportunity costs and differences in functionality are outside this arithmetic.
A PostgreSQL budget should describe the workload and the recovery promise, not just a disk size. The same database size can support very different query rates and latency requirements. Use the calculator for recurring and transition costs, then validate capacity with representative queries and maintenance work.
Capture a useful workload profile
| Driver | What to collect | Why it changes cost |
|---|---|---|
| Queries | Throughput, latency and expensive plans | CPU, memory and IO |
| Working set | Frequently accessed tables and indexes | Cache requirements |
| Write rate | Transactions, batch imports and WAL growth | Storage bandwidth and recovery retention |
| Connections | Peaks and pooling behavior | Memory and contention |
| Growth | Table, index and large-object trends | Capacity and maintenance |
| Recovery | Required data loss and downtime limits | Backup, replicas and operational work |
A large cold archive and a small busy transaction database should not receive the same sizing logic. Record busy-hour demand and scheduled imports; an average daily query rate can conceal the event that causes an outage.
Price the recovery design explicitly
PostgreSQL backup documentation distinguishes logical backups, filesystem-level approaches and continuous archiving. Each has different prerequisites and recovery behavior. A replica is not a substitute for an independent recovery copy: unwanted changes can replicate too.
The high-availability documentation describes trade-offs between replication approaches. Do not infer zero data loss or automatic failover merely from having a second machine. State what failure is covered, who authorizes failover and how applications reconnect.
An illustrative inventory might contain a primary with 500 GB of tables and indexes, a replica and retained recovery data. It is not a 500 GB bill. The replica, WAL, independent copies, temporary operations and headroom require their own estimates. These quantities must come from the design and observed change rate.
Include maintenance and application responsibility
Vacuum, statistics, indexing, version upgrades and capacity reviews are ongoing work. Routine vacuuming also explains why deleting records does not necessarily shrink the underlying files. A retention project may reduce future growth before it reduces an invoice.
Agree who owns slow queries and schema changes. An operator can keep the database healthy while the application still sends expensive queries. The budget should distinguish database operation, application engineering and any specialist migration work.
Compare to an actual managed-database bill
A source service may include storage, backups, failover and support in different line items. Identify what can end and what the application still needs. Migration may involve extensions, encoding, permissions, connection limits and downtime constraints. A nominally cheaper machine is not equivalent to a complete managed database service.
Use the service rates from Pilae pricing and a workload-specific infrastructure quote. Include licences or commercial support only where actually required. For owned hardware, show incremental cash and full replacement cost separately. The live calculation cannot verify whether the entered capacity meets the workload.
Acceptance before production reliance
Rehearse a restore with the chosen method and record time until the application can use the data. Validate roles, extensions, recent transactions and connection behavior. Test the recovery copy independently from the primary and include encryption-key access in the exercise.
For migration, reconcile row counts and business totals, compare important query results and plan how writes are paused or synchronized. Keep a rollback decision point before incompatible changes make returning difficult. The point-in-time recovery architecture explains that design decision; the retention cost guide addresses reducing growth safely.
Sources and further reading
Use the linked documentation to confirm the version, edition and contract that apply to your project.
