Estimate Supabase costs for any project using live pricing data. Use when user asks about Supabase pricing, BaaS costs, or PostgreSQL-based backend costs.
Estimate costs for Supabase-based projects using current pricing data.
IMPORTANT: Always verify tool availability before providing cost estimates.
Check if the following tools are available:
Supabase CLI (preferred):
supabase CLI for project informationsupabase projects list - List projectssupabase orgs list - List organizationsSupabase Management API:
If Supabase CLI is not accessible, help the user set it up:
Option A: Supabase CLI
# Install Supabase CLI
# macOS
brew install supabase/tap/supabase
# npm
npm install -g supabase
# Login
supabase login
Option B: Supabase Management API
# Get access token from dashboard
# https://supabase.com/dashboard/account/tokens
# List projects
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.supabase.com/v1/projects"
# Get project details (includes usage)
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.supabase.com/v1/projects/PROJECT_REF"
Ask the user which option fits their environment before proceeding.
If no tools are available and user cannot install them, use web search to fetch current pricing from:
# List all projects
supabase projects list
# Get project status (includes some usage info)
supabase status
# Link to project for detailed info
supabase link --project-ref YOUR_PROJECT_REF
# Get organization billing
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.supabase.com/v1/organizations/ORG_ID/billing"
# Get project usage
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.supabase.com/v1/projects/PROJECT_REF/usage"
# Get subscription details
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.supabase.com/v1/projects/PROJECT_REF/subscription"
Fetch current pricing from Supabase pricing page:
Can be invoked directly for cost estimation:
| Tier | Query Method |
|---|---|
| Free | supabase.com/pricing or API |
| Pro | supabase.com/pricing or API |
| Team | supabase.com/pricing or API |
| Enterprise | Contact sales |
| Resource | Query Method |
|---|---|
| Compute | API: /projects/{ref}/usage |
| Database Storage | API: /projects/{ref}/usage |
| File Storage | API: /projects/{ref}/usage |
| Bandwidth | API: /projects/{ref}/usage |
| Edge Functions | API: /projects/{ref}/usage |
# Via API
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.supabase.com/v1/projects/PROJECT_REF/usage"
# Response includes:
# - database_size_bytes
# - storage_size_bytes
# - bandwidth_bytes
# - function_invocations
# - mau (monthly active users)
supabase_cost_estimate:
description: "<what's being estimated>"
pricing_source: "<cli|api|web>"
pricing_date: "<when pricing was fetched>"
recommended_tier: "<free|pro|team|enterprise>"
tier_details:
name: "<tier name>"
base_price: "<$X/mo>"
included:
database_gb: <N>
storage_gb: <N>
bandwidth_gb: <N>
mau: <N>
edge_function_invocations: <N>
usage_estimate:
database_gb: <N>
storage_gb: <N>
bandwidth_gb: <N>
mau: <N>
baseline_monthly:
tier_base: "<$X>"
compute_addon: "<$X>"
database_addon: "<$X>"
storage_addon: "<$X>"
bandwidth_addon: "<$X>"
other_addons: "<$X>"
total: "<$X>"
at_10x_scale:
tier: "<$X>"
addons: "<$X>"
total: "<$X>"
included_features:
- "PostgreSQL database"
- "Auth (email, OAuth, magic link, phone)"
- "Realtime subscriptions"
- "Edge Functions (Deno)"
- "Storage (S3-compatible)"
- "Vector embeddings (pgvector)"
- "Auto-generated APIs"
optimization_tips:
- "<tip 1>"
- "<tip 2>"
# Set up usage monitoring
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.supabase.com/v1/projects/PROJECT_REF/usage"
# Check daily stats
# Dashboard: https://supabase.com/dashboard/project/_/reports
-- Check database size
SELECT pg_size_pretty(pg_database_size(current_database()));
-- Find large tables
SELECT relname, pg_size_pretty(pg_total_relation_size(relid))
FROM pg_catalog.pg_statio_user_tables
ORDER BY pg_total_relation_size(relid) DESC;
-- Enable connection pooling (PgBouncer)
-- Use transaction mode for serverless
# List storage buckets and sizes via API
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.supabase.com/v1/projects/PROJECT_REF/storage/buckets"
When comparing costs:
For very large scale, consider self-hosting:
# Self-hosted Supabase
git clone https://github.com/supabase/supabase
cd supabase/docker
docker compose up
Costs shift to infrastructure (compute, storage) instead of Supabase fees.