This document explains pricing details for Firestore Standard edition. For Enterprise edition pricing, see Firestore Enterprise edition pricing.
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
When you use Firestore, you are charged for the following:
Storage and bandwidth usage are calculated in gibibytes (GiB), where 1 GiB = 230 bytes. All charges accrue daily.
The following sections provide details about how you are charged for your Firestore usage.
Firestore offers free quota that lets you get started at no cost. The free quota amounts are listed below. If you need more quota, you must enable billing for your Google Cloud project.
Quotas are applied daily and reset around midnight Pacific time.
Firestore allows exactly one free database per project.
Free tier | Quota |
---|---|
Stored data | 1 GiB |
Document reads | 50,000 per day |
Document writes | 20,000 per day |
Document deletes | 20,000 per day |
Outbound data transfer | 10 GiB per month |
The following operations and features do not include free usage. You must enable billing to use these features:
For more information about how these features are billed, see Storage pricing.
The following table lists pricing for reads, writes, deletes, and storage for each Firestore location:
Free quota per day | Default* (USD) | Cloud Firestore CUD - 1 Year* (USD) | Cloud Firestore CUD - 3 Year* (USD) | Price unit | |
---|---|---|---|---|---|
Document Reads | 50,000 | $0.03 | $0.024 | $0.018 | per 100,000 documents |
Document Writes | 20,000 | $0.09 | $0.072 | $0.054 | per 100,000 documents |
Document Deletes | 20,000 | $0.01 | $0.008 | $0.006 | per 100,000 documents |
TTL Deletes | Not supported | $0.01 | $0.008 | $0.006 | per 100,000 documents |
Stored Data | 1 GiB storage | $0.000205479 | - | - | GiB |
PITR data | Not supported | $0.000205479 | - | - | GiB |
Backup data | Not supported | $0.000041096 | - | - | GiB |
Restore operation | Not supported | $0.20 | - | - | GiB |
*Prices reflect the price beyond the free quota (per unit).
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
To create a named (non-default) database, you must enable billing.
There's no additional cost to you for creating or deleting the named databases, but those databases do not qualify for the free quota. Instead, you will be charged on usage incurred on those named databases.
You are charged for documents and index entries read to satisfy a query. You are charged for each document write and delete that you perform.
Charges for writes and deletes are straightforward. For writes, each set or update operation counts as a single write.
Charges for read operations have some nuances that you should keep in mind. The following sections explain these nuances in detail.
You are charged one read operation for each batch of up to 1000 index entries read by a query except in the following:
Note: You can use Firestore Query Explain to confirm if a query charges index entries read.
For example, if the following vector search query with limit: 5 returns 5 documents and reads 1550 kNN vector index entries, you are billed 5 read operations for the documents returned and 16 read operations for the index entries:
For example, the following query contains one equality field (age) and one range field (start_date) and is not charged for index entries read:
For example, the following query contains one equality field (age) and one range field (start_date) and is not charged for index entries read:
The following query contains two range fields (age and start_date) and is charged for index entries reads:
A field that appears in the order by clause is considered a range field when there is at least one other range field in the query. Therefore the following query contains two range fields (age and start_date) and is charged for index entries reads:
The __name__ field is always considered a range field, even if it is only used in an equality filter. Therefore the following query contains two range fields (age and __name__) and is charged for index entries reads:
For aggregation queries such as count(), sum(), and avg(), you are charged for index entries read by the query as described above. For aggregation queries that read 0 index entries, there is a minimum charge of one document read.
For example, count() operations that read between 0 and 1000 index entries are billed for one document read. For a count() operation that reads 1500 index entries, you are billed 2 document reads.
To learn more about the indexes used and the index entries read, use Query Explain.
Firestore allows you to listen to the results of a query and get realtime updates when the query results change.
When you listen to the results of a query, you are charged for a read each time a document in the result set is added or updated. You are also charged for a read when a document is removed from the result set because the document has changed. (In contrast, when a document is deleted, you are not charged for a read.)
Billing of listeners in the mobile and web SDKS also depends on whether offline persistence is enabled or not:
Note: Queries with up to one range field are exempted from charging for index entries read. See here for details.
Firestore has several features to help you manage queries that return a large number of results:
There are no additional costs for using cursors, page tokens, and limits. In fact, these features can help you save money by reading only the documents that you actually need.
However, when you send a query that includes an offset, you are charged a read for each skipped document. For example, if your query uses an offset of 10, and the query returns 1 document, you are charged for 11 reads. Because of this additional cost, you should use cursors instead of offsets whenever possible.
For queries other than document reads, such as a request for a list of collection IDs, you are billed for one document read. If fetching the complete set of results requires more than one request (for example, if you are using pagination), you are billed once per request.
There is a minimum charge of one document read for each query that you perform, even if the query returns no results.
For mobile and web client libraries, if your Firestore Security Rules use exists(), get(), or getAfter() to read one or more documents from your database, you are charged for additional reads as follows:
You are charged for the amount of data that you store in Firestore, including storage overhead. The amount of overhead includes metadata, automatic indexes, and composite indexes.
Each document stored in Firestore requires the following metadata:
Storage costs are in GiB/month and calculated daily. Firestore measures the database size daily. Over the period of a month, these sample points are averaged to calculate the database storage size. This average value is multiplied by the unit price of storage (GiB-month)
Learn how Firestore storage is calculated at Storage Size Calculations.
If you enable PITR, you are charged for the storage of PITR data. Most customers will find that the overall cost of PiTR data storage is similar to the storage cost of the database.
Note: PITR data is billed separately from the database storage size billing. PITR data doesn't affect your data storage size costs.
Storage costs for PITR are in GiB/month and calculated daily. Firestore measures the database size daily. Over the period of a month, these sample points are averaged to calculate the database storage size. This average value is multiplied by the unit price of PITR (GiB-month).
For example, if the average size of your database during a month is 1 GiB and PITR is enabled for the whole month, then the billable PITR data size is 1 GiB as well.
Minimum billing: You may be charged up to 1 day of PITR storage cost even if you disable PITR within a day after enablement.
If you enable backups, you are charged for the storage of your database backups. The storage size for a backup is equal to the storage size of the database when the backup was taken.
Storage costs for backups are in GiB/month. Over the period of a month, the number of days for which each backup is retained, averaged over the month is also calculated. The cost of each backup is calculated using the storage size of the backup multiplied by the proportion of the month the backup is retained, multiplied by the unit price. Day boundaries are defined by the America/Los_Angeles time zone for billing purposes.
When you perform a restore operation, Firestore measures the size of the backup for the restore operation. The size of the backup is multiplied by the unit price of restore operations (GiB).
Use of Firestore Query Explain incurs costs.
When a query is explained with the default option, no index read operations are performed. Regardless of query complexity, one read operation is charged.
When a query is explained with the analyze option, index and read operations are performed, so you are charged for the query as usual. There is no additional charge for the explain and analyze activity, only the usual charge for the query being executed.
You are charged for the network bandwidth used by your Firestore requests, as shown in the following sections. The network bandwidth cost of a Firestore request depends on the request’s response size, the location of your Firestore database, and the destination of the response.
Firestore calculates response size based on a serialized message format. Protocol overhead, such as SSL overhead, does not count towards network bandwidth usage. Requests denied by your Firestore Security Rules do not count towards network bandwidth usage.
To learn how much network bandwidth you have used, you can use the Google Cloud console to export your billing data to a file.
For requests that originate within Google Cloud Platform (for example, from an application running on Google Compute Engine), you are charged as follows:
Traffic type | Price |
---|---|
Inbound data transfer | Free |
Data transfer within a region | Free |
Data transfer between regions in the same multi-region | Free |
Data transfer between regions within the US (per GiB) | $0.01 (first 10 GiB per month are free) |
Data transfer between regions, not including traffic between US regions |
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
You will be charged for internet data transfer for the following:
Network Outbound data transfer: Worldwide Destinations (excluding China & Australia, but including Hong Kong) (per GiB)
Services | Price (USD) |
---|---|
APAC, Europe, Americas | 0 gibibyte to 10 gibibyte $0.00 (Free) 10 gibibyte to 1,024 gibibyte $0.12 1,024 gibibyte to 10,240 gibibyte $0.11 10,240 gibibyte and above $0.08 |
Singapore, Tokyo | 0 gibibyte to 10 gibibyte $0.00 (Free) 10 gibibyte to 1,024 gibibyte $0.14 1,024 gibibyte to 10,240 gibibyte $0.13 10,240 gibibyte and above $0.09 |
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
Price (USD) | |
---|---|
Network Outbound data transfer: China Destinations (excluding Hong Kong) (per GiB) | 0 gibibyte to 10 gibibyte $0.00 (Free) 10 gibibyte to 1,024 gibibyte $0.23 1,024 gibibyte to 10,240 gibibyte $0.22 10,240 gibibyte and above $0.20 |
Network Outbound data transfer: Australia Destinations (per GiB) | 0 gibibyte to 10 gibibyte $0.00 (Free) 10 gibibyte to 1,024 gibibyte $0.19 1,024 gibibyte to 10,240 gibibyte $0.18 10,240 gibibyte and above $0.15 |
Network Inbound data transfer | $0 (Free) |
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
To learn how to monitor your Firestore usage, see Monitoring usage.
To manage your spending, set monthly budgets and alerts.
Google Cloud allows you to set a monthly budget for all Google Cloud services. Use a monthly budget to monitor your overall Google Cloud costs, including your network bandwidth costs for Firestore. After you set a budget, you can set alerts, which cause you to receive email notifications as your costs grow closer to your budget.
Important: Requests to Firestore and other Google Cloud services will succeed even if you have exceeded your monthly Google Cloud budget. It is your responsibility to change your usage patterns so that you stay within your Google Cloud budget.
Follow these instructions to set a monthly budget and create alerts in the Google Cloud console.
To see how Firestore billing costs accrue in a real-world sample app, see the Firestore billing example.