Book a free call

How Much Does a Vector Database Cost?

A vector database costs a few dollars a month for a small test, or thousands in production. The price depends on how many vectors you store and how often you query.

Hertiv engineering teamReviewed by a senior engineer
6 min read
How Much Does a Vector Database Cost?
On this page

Short answer

A vector database costs from a few dollars a month for a small hosted index to several thousand a month for a large production workload with high query volume. The main cost drivers are the number and size of vectors, the number of queries, the performance tier and whether you run it yourself or pay a hosted service.

What is a vector database?

A vector database is a database built to store and search vectors, which are lists of numbers that describe the meaning of text, images or other items. When you search, it finds the vectors closest to your query instead of matching exact words.

Teams use vector databases to power search, recommendations and retrieval for AI applications. A document is turned into a vector by an embedding model, stored with its metadata, and later retrieved by similarity when a user asks a question. The database handles the search so the application does not have to scan every record.

The cost of a vector database depends on how much data you store, how fast the search must be and how you run it. A small test index and a production system serving thousands of queries a minute are priced very differently, even though they use the same idea. A vector database is best understood as a specialised index, not as a general-purpose database.

What you storeExampleWhat it affects
VectorsEmbedding of a documentStorage and memory
MetadataTitle, date, sourceFiltering and storage
IndexSearch structure over vectorsSpeed and memory

What makes up the cost of a vector database?

The cost of a vector database breaks into four parts: storage, compute, queries and running the service. Hosted services roll these into a monthly price, while self-hosted setups split them across servers, storage and staff time.

Cost partWhat you pay forPlanning range
StorageVectors and metadata on diskLow for small indexes
ComputeMemory and CPU for searchGrows with query speed
QueriesSearches per monthOften the largest line
Running itUpdates, backups, monitoringStaff time if self-hosted

Storage is usually the smallest line for a new project. Vectors are compact: a single vector with 768 numbers stored as 4-byte values takes about 3 kilobytes. A million such vectors take about 3 gigabytes before index overhead, which is small next to the cost of fast search.

Compute is where the money goes. Fast search needs the index in memory, and memory is priced by the hour on hosted services. The more vectors you hold and the faster the answers must be, the more memory you rent. Query volume adds a second charge on many hosted plans.

How do hosted and self-hosted costs differ?

Hosted and self-hosted vector databases differ in what you pay for and what you manage. A hosted service charges a monthly price and handles servers, updates and backups. A self-hosted setup costs less in vendor fees but needs someone to run it.

OptionYou pay forYou manage
HostedMonthly plan or usageAlmost nothing
Self-hostedServers and storageUpdates, backups, scaling
EmbeddedPart of your app serverThe library and its files

Hosted services usually offer a free tier for small indexes and paid tiers that scale with storage and queries. The free tier is useful for a prototype, but it often caps the number of vectors or the query rate, so a production workload moves to a paid plan quickly.

Self-hosting can look cheaper on a price list, because open-source vector databases have no licence fee. The real cost is the server that holds the index in memory plus the time to keep it updated, backed up and monitored. For a small team, that time often costs more than a hosted plan. A vector database that nobody maintains will slow down or fail at the worst moment.

What drives the cost up or down?

Five factors decide most of the price of a vector database. The first is the number of vectors: doubling the collection roughly doubles the storage and the memory the index needs.

The second is the size of each vector, which depends on the embedding model. A model that produces 1,536 numbers per item costs about twice as much to store as one that produces 768, for the same number of items. Choosing a smaller embedding model is one of the cheapest ways to cut the bill.

The third is query volume. A system that answers a few hundred searches a day can run on a small instance, while one that answers thousands a minute needs more memory and often more replicas. The fourth is latency: answers in under 100 milliseconds need the index fully in memory, while slower answers can use cheaper storage.

The fifth is reliability. Replicas, backups and uptime guarantees each add cost, and they are worth paying for once the search supports a live product. A vector database comparison should always list these factors next to the price, because the cheapest plan is rarely the cheapest system.

How do you estimate your own cost?

You estimate a vector database cost by counting what you store, how often you search and how fast the answers must be, then pricing that shape against a hosted plan and a self-hosted server.

  1. Count the vectors. Multiply the number of items by the vectors per item. A document split into ten chunks is ten vectors, not one.
  2. Work out the size. Multiply the vector count by the dimensions and by 4 bytes, then add room for the index and metadata.
  3. Count the queries. Estimate searches per day and per peak minute, not just the average.
  4. Set the latency target. Decide how fast an answer must be, because that sets the memory tier.
  5. Price both options. Get a hosted quote for that shape and a server price for the same shape, then add staff time to the self-hosted figure.
  6. Add a margin. Collections grow. Budget for twice the vectors you have today within a year.

The margin step is the one teams skip most often. A collection that starts at 200,000 vectors and grows by 10,000 a week passes a million in under two years, and the index that fit in memory at the start may not fit later.

Example (hypothetical): a support search for 2 million documents

Example (hypothetical): a support team wants to search 2 million help articles and past tickets. Each document becomes one vector of 768 numbers, stored as 4-byte values.

The raw vector storage is 2,000,000 times 768 times 4 bytes, which is 6,144,000,000 bytes, or about 6.1 gigabytes. With the search index and metadata, the team plans for about 12 gigabytes of memory, roughly double the raw size.

The team expects 10,000 searches a day, with a peak of 200 a minute, and answers within 200 milliseconds. A hosted plan in that shape falls in a planning range of $80 to $150 a month. Over a year that is $960 to $1,800, before the cost of generating the embeddings. The arithmetic is simple: 2,000,000 vectors at 768 numbers and 4 bytes each is 6.1 gigabytes raw, and the index roughly doubles it.

What are the common mistakes?

The most common mistakes are counting documents instead of vectors, ignoring query peaks, and choosing the cheapest plan without checking what it leaves out.

  • Counting documents, not vectors. A document split into chunks is many vectors, and the bill follows the vector count.
  • Ignoring peak queries. An average of 10 searches a minute can hide a peak of 200, which is what the system must handle.
  • Picking the free tier for production. Free tiers cap vectors and queries, and hitting the cap in production breaks search.
  • Forgetting the embedding cost. Generating vectors for a large collection is a separate bill, and re-embedding after a model change doubles it.
  • Skipping backups. Rebuilding a large index from scratch takes hours, and the time costs more than the backup.
  • No growth margin. A collection that doubles in a year needs a plan that fits the larger size.

Key takeaways

  • A vector database stores number lists called vectors and searches by similarity, not by exact words
  • Storage is usually the smallest line; memory for fast search and query volume cost the most
  • Hosted plans are cheaper in staff time, self-hosting is cheaper in vendor fees only if someone runs it
  • Count vectors, not documents: a document split into chunks is many vectors
  • Budget for twice the vectors you have today and price the peak query rate

Frequently asked questions

How much does a vector database cost for a small project?

A small hosted index with under 100,000 vectors often fits a free tier or a plan of a few dollars a month. Costs rise with the number of vectors, the query volume and the speed you need. A production workload with millions of vectors usually costs from tens to hundreds of dollars a month.

Is a vector database free to run yourself?

Open-source vector databases have no licence fee, but running one is not free. You still pay for the server that holds the index in memory, for storage and backups, and for the time to keep it updated and monitored. For a small team, that time often costs more than a hosted plan.

Does the embedding model change the cost?

Yes. A model that produces 1,536 numbers per item costs about twice as much to store as one that produces 768, for the same number of items. The embedding model also decides the cost of generating the vectors in the first place, which is a separate bill for large collections.

How many vectors can a free tier hold?

It depends on the provider, and the limits change often, so check the vendor page before you plan around a number. Free tiers commonly cap the vector count, the query rate or the storage, and they are meant for prototypes rather than production workloads.

Do I need a vector database for a chatbot?

You need one when the chatbot must search your own documents and answer from them. The vector database holds the document embeddings and returns the most relevant passages for each question. If the chatbot only answers from its own training, no vector database is needed.

What is the difference between a vector database and a normal database?

A normal database finds rows that match exact values, such as a date or a name. A vector database finds items whose meaning is closest to a query, by comparing number lists. The two are often used together: the vector database finds the candidates and the normal database holds the records.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning retrieval for an AI product and wondering what the search layer will cost? Talk to Hertiv.

A senior engineer replies within one business day. Or see our RAG Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call