Skip to content
ENExplore Calculators

Metrics Cardinality Calculator

Calculate total time series cardinality from metric names and label combinations.

About Metrics Cardinality Calculator

Prometheus cardinality is the product of every metric name and the distinct values of every label attached to it — adding a label with N distinct values multiplies your series count by N. Formula: total_series = base_metrics × label1_values × label2_values × label3_values. Labels with unbounded or high-cardinality values (pod names, user IDs, request IDs) are the most common cause of cardinality explosions that exhaust Prometheus memory and slow queries.

Formulas

Total time series

total_series = base_metrics × label1_values × label2_values × label3_values

base_metrics
Number of distinct metric names
label1_values
Cardinality of label 1
label2_values
Cardinality of label 2
label3_values
Cardinality of label 3

Memory footprint

memory_MiB = total_series × bytes_per_series / (1024 × 1024)

total_series
Total active time series count
bytes_per_series
In-memory bytes per active series

Worked example

With the default values below, Metrics Cardinality Calculator returns Total Active Time Series of 500,000. Change any input above and every figure here is recalculated in your browser.

Inputs used

Base Metric Countaccepts 1–100,000 metrics
50 metrics
Label 1 — Cardinalityaccepts 1–1,000,000 values
20 values
Label 2 — Cardinalityaccepts 1–1,000,000 values
10 values
Label 3 — Cardinalityaccepts 1–1,000,000 values
50 values
Bytes per Series (in-memory)accepts 1–100,000 bytes
3,200 bytes

Results

Total Active Time Series
500,000
Estimated Memory Footprint
1,525.9 MiB
Estimated Memory Footprint
1.490 GiB
Series Without Label 3
10,000

Step by step

  1. 1Total series: base × label1 × label2 × label3= 500,000 series
  2. 2Series without highest-cardinality label= 10,000 series
  3. 3In-memory footprint= 1525.9 MiB

Assumptions and limits

  • The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why is high cardinality a problem?

Each unique label combination creates a new time series that Prometheus must keep in memory and index. Cardinality explosions can consume gigabytes of RAM, slow down queries, and in extreme cases crash the Prometheus process (OOM).

Which labels typically cause explosions?

Labels with values that grow unboundedly or scale with infrastructure churn — pod names, container IDs, user IDs, request IDs, or raw URLs with path parameters — are the usual culprits, unlike bounded labels like status_code or method.

How can I reduce cardinality without losing visibility?

Aggregate high-cardinality labels at collection time, use recording rules to pre-aggregate before long-term storage, or drop/relabel volatile labels (e.g. pod_name) in favor of a stable label like deployment or service.

Is 3-4KB per series accurate?

It's a common rule of thumb for Prometheus's in-memory chunks (varies with churn rate and Prometheus version); use `prometheus_tsdb_head_series` and process memory metrics from your own instance to calibrate a more precise figure.

Metrics Cardinality Calculator | Calcrivo