Firebase Estimate
To calculate your Firebase Cloud Costs using your specific user metrics and Firestore Enterprise Edition paired with Cloud Storage, you need a formula that maps business activity to exact cloud infrastructure billing units. Under the Firestore Enterprise Edition model, operations are billed via Read Units and Write Units (where 1 unit = 4 KiB of data), rather than a flat per-document count like the Standard edition. [1, 2] The comprehensive cost formula and its application across your traffic tiers are broken down below.
The total monthly bill is the sum of your Firestore compute operations, Firestore data retention, Storage usage, and Network data transfer out (Egress). $$\text{Total Monthly Cost} = \text{Firestore Reads} + \text{Firestore Writes} + \text{Firestore DB Storage} + \text{Storage Disks} + \text{Network Egress}$$
To tie this directly to your list metrics (Monthly Sessions and Average Customer Duration in minutes), we must project how many operational events occur per minute of an active session.
Firestore Read Cost: (Note: Firestore Enterprise starts at $0.05 to $0.30 per million read units depending on your committed use discounts). $$\left(\text{Sessions} \times \text{Duration} \times \text{Reads per Min} \times \text{Avg. Read Units}\right) \times \frac{$0.05 \text{ or } $0.30}{1,000,000}$$
Firestore Write Cost: (Note: Enterprise write units cost roughly $0.208 per million). $$\left(\text{Sessions} \times \text{Duration} \times \text{Writes per Min} \times \text{Avg. Write Units}\right) \times \frac{$0.208}{1,000,000}$$
Network Egress Cost (Data Sent to User) (Note: Firebase network egress is $0.12 per GB) $$\left(\text{Sessions} \times \text{Duration} \times \text{Data Payload Transferred per Min in GB}\right) \times $0.12\text{/GB}$$
- Firestore Database Storage: $\text{Total GB Data Retained} \times $0.00032\text{ per GiB hour}$ (~$0.23/GB/month).
- Cloud Storage (Assets/Files): $\text{Total GB Files Stored} \times $0.026\text{ per GB/month}$. [7, 8, 9]
To ground the formula in reality for an active, high-engagement application (like a live tracker or dashboard environment mirroring your 8–15 minute durations), we apply these standard baseline activity multipliers per user session:
- Reads per Minute: 20 document reads/min (polling or initial feed hydrations).
- Writes per Minute: 2 document writes/min (saves, status updates, or clicks).
- Average Document Payload Size: $\le$ 4 KiB (counts as exactly 1 Read/Write unit).
- Egress per Minute: 0.002 GB (2 MB) of background asset syncing/data streams per minute.
Applying the formula using the multipliers above reveals how costs grow with your provided data:
| Monthly Users | Avg. Session Duration (Mins) | Total Active App Minutes per Month | Est. Monthly Firestore Ops Cost | Est. Monthly Network Egress Cost | Total Estimated Variable Cost/Mo |
|---|---|---|---|---|---|
| 1,000 | 8 | 8,000 mins | $0.04 | $1.92 | $1.96 (Fully within Free Tiers) |
| 5,000 | 8 | 40,000 mins | $0.22 | $9.60 | $9.82 |
| 22,000 | 12 | 264,000 mins | $1.43 | $63.36 | $64.79 |
| 52,000 | 12 | 624,000 mins | $3.38 | $149.76 | $153.14 |
| 140,000 | 15 | 2,100,000 mins | $11.38 | $504.00 | $515.38 |
| 400,000 | 15 | 6,000,000 mins | $32.52 | $1,440.00 | $1,472.52 |
| 700,000 | 15 | 10,500,000 mins | $56.91 | $2,520.00 | $2,576.91 |
Note: These estimates cover the runtime activity. You must add your base data retention to this bill (e.g., if your 700,000 users leave behind 500 GB of permanent data in the Firestore database, add an extra $115.00/month for static database storage).
The total monthly cost framework is adjusted as follows: $$\text{Total Monthly Cost} = \text{Firebase Base Stack} + \text{Cloud Semantic Analysis Cost} + \text{Vertex AI Cost}$$
- Google Cloud Natural Language API (Semantic Analysis): Billed per “Text Unit”. A unit is a document (or portion of text) under 1,000 characters sent to the API.
- Standard Rate: $1.00 per 1,000 units (with a monthly free tier of 5,000 units).
- Formula: $\left(\text{Sessions} \times \text{Semantic Triggers per Session}\right) \times \frac{$1.00}{1,000}$ [6, 7, 8, 9]
- Google Vertex AI (e.g., Gemini & Text Embeddings): Billed per 1 Million Tokens. Assuming a combination of Gemini Pro/Flash features and Vector search embeddings:
- Standard Rates: $0.15 per 1M input tokens (Gemini Embedding 001) or $0.075 per 1M input tokens (Gemini Flash).
- Formula: $\left(\text{Sessions} \times \text{AI Queries per Session} \times \text{Tokens per Query}\right) \times \frac{\text{Token Price}}{1,000,000}$ [2, 10, 11]
To keep calculations uniform with your traffic cohorts, assume a baseline where user activity triggers the backend to analyze text and fetch AI results:
- Semantic Analysis Interaction: A user performs 2 text submissions per session (e.g., leaving comments, processing
- product feedback, searching complex strings), averaging 1,500 characters per submission. This equals 4 Text Units per session.
- Vertex AI Interaction: A user makes 3 distinct prompts/queries to a Gemini-powered feature per session.
- Each query averages 500 input tokens (including context windows or system instructions), totaling 1,500 input tokens per session. [2, 12, 13]
Combining your original Firebase calculation with the added Google Cloud Natural Language API and Vertex AI workloads shows how your costs scale:
| Monthly Users | Avg. Duration (Mins) | Previous Firebase Variable Cost | Natural Language API (Semantic Analysis) | Vertex AI (Gemini / Embeddings) | New Total Estimated Monthly Bill |
|---|---|---|---|---|---|
| 1,000 | 8 | $1.96 | $0.00 (Free Tier) | $0.00 (Minimal) | $1.96 (Fully within free limits) |
| 5,000 | 8 | $9.82 | $0.00 (Free Tier) | $0.01 | $9.83 |
| 22,000 | 12 | $64.79 | $88.00 | $0.03 | $152.82 |
| 52,000 | 12 | $153.14 | $208.00 | $0.06 | $361.20 |
| 140,000 | 15 | $515.38 | $560.00 | $0.16 | $1,075.54 |
| 400,000 | 15 | $1,472.52 | $1,600.00 | $0.45 | $3,072.97 |
| 700,000 | 15 | $2,576.91 | $2,800.00 | $0.79 | $5,377.70 |
Notice that Semantic Analysis via the Natural Language API adds significantly more cost at higher volumes than standard text embeddings. This occurs because the Natural Language API operates on a flat per-character unit structure, whereas modern models (like Gemini on Vertex AI) offer highly competitive token pricing. If you use Vertex AI for semantic vector indexing (via Vertex AI Vector Search), you will also introduce a static cost for keeping the search index running continuously in the background (typically around $150 to $300/month per active index node depending on shard sizes)