GA4 Calculated Metrics: How to Create Them, Limits and Examples

GA4 Calculated Metrics: How to Create Them, Limits and Examples

analyticsDecember 1, 2026
By Antonio Fernandez

TL;DR

  • A standard GA4 property allows up to 5 calculated metrics; a GA4 360 property allows up to 50, per Google's GA4 help docs.
  • Create them in Admin > Custom definitions > Calculated metrics; you need the Editor or Administrator role.
  • Formulas put metric names in curly brackets and support only + - * / and parentheses, up to 1,024 characters, with no functions.
  • A calculated metric cannot reference another calculated metric, and the API name cannot be changed after you save.
  • They work in standard reports, explorations and the Data API, where they are referenced as calcMetric: plus the API name.

GA4 calculated metrics are custom formulas, built in Admin, that combine existing metrics such as purchase revenue, sessions or a custom metric into a new metric you can report on. A standard GA4 property can hold up to 5 calculated metrics and a GA4 360 property up to 50, and once saved they work in standard reports, explorations and the Google Analytics Data API.

That short answer hides most of the useful detail. The formula syntax is strict, the unit you pick changes how the number is displayed, and the 5-metric cap on a standard property means you have to choose carefully. This guide walks through what calculated metrics are, how to create one, which formulas are worth spending a slot on, where they show up, how they compare with custom metrics and Looker Studio calculated fields, and the errors people hit most often.

What calculated metrics are in GA4

A calculated metric is a metric that does not exist in the raw event data. GA4 computes it at query time from other metrics using a formula you define. Google's help documentation describes them as combining one or more existing metrics and/or custom metrics in a mathematical formula to create a new metric. Google's own example is an "Item margin" metric built from the predefined Item price metric and a custom metric holding item cost of goods sold.

Three properties of calculated metrics matter in practice:

  • They are computed, not collected. Nothing changes in your tagging. GA4 runs the formula against metrics it already has.
  • They sit at property level. Once created, any user with access to the property can add the metric to a report or exploration, so you define a ratio once instead of everyone recreating it in a spreadsheet.
  • They have an API name. Each calculated metric gets an API name that can be referenced from the Data API, which matters if you pull GA4 data into another tool.

Before GA4 added this feature, the usual workaround was to export two metrics and divide them somewhere else. That still works, but it means the number only exists in that one sheet or dashboard. A calculated metric puts the definition inside GA4, where it is the same for everyone.

How to create a calculated metric: admin path and formula syntax

You need the Editor or Administrator role on the property. Other roles can see calculated metrics in reports but cannot create them.

The admin path

  1. Open Admin (the gear icon) and confirm you are in the right account and property.
  2. Under the property column, open Custom definitions.
  3. Select the Calculated metrics tab.
  4. Click Create calculated metric.
  5. Fill in the name, API name, description, formula and unit of measurement, then click Save.

The name must be unique across both calculated metrics and custom metrics, and you can change it later. The API name is filled in automatically, may contain only letters, numbers and underscores, and cannot be changed once the metric is created. Pick it with care, because anything that queries the metric through the API will depend on it. To change a metric later, use the More menu next to it in the list; you can edit the name, description, formula and unit, or make a copy.

Formula syntax

The formula editor follows a small set of rules from Google's documentation:

  • Metric names go inside single curly brackets, for example {Purchase revenue} or {Sessions}.
  • You can use plain numbers and decimals, such as 100 or 0.07.
  • The accepted operators are addition, subtraction (including a negative sign), multiplication, division and parentheses.
  • Formulas are limited to 1,024 characters.
  • The Admin API reference adds that a formula can reference up to 5 unique custom metrics.

There are no functions. You cannot write IF statements, rounding, averages over time or text logic. If a metric needs a condition, the condition has to live somewhere else, usually in the event tagging or in a custom metric you send with the event.

A simple working example: a formula of {Purchase revenue} / {Total users} with the unit set to Currency gives revenue per user. A formula of ({Purchase revenue} - {Refund amount}) / {Sessions} uses parentheses to subtract first and divide second.

Choosing a unit of measurement

Every calculated metric needs a unit. The Admin API lists the allowed values as standard (a plain number), currency, feet, miles, meters, kilometers, milliseconds, seconds, minutes and hours. The unit controls how GA4 formats the result. Revenue per user should be Currency, so it shows with the property's currency symbol. A rate such as sessions with a lead divided by sessions should be Standard, because there is no percent unit in the list.

Useful calculated metric examples for marketers

With only 5 slots on a standard property, each calculated metric should answer a question someone asks every week. These are formulas built only from metrics GA4 already provides or from a custom metric you control. The exact metric names in your property may differ slightly, so check them in the formula editor's picker.

Revenue per user

Formula: {Purchase revenue} / {Total users}, unit Currency. This shows how much revenue each user brings in over the date range, which is often more useful than conversion rate when order values vary a lot between channels. GA4 already has an "Average purchase revenue per user" metric, so check whether the predefined one does what you need before spending a slot.

Lead rate per session

If you send a lead event and have marked it as a key event, GA4 already offers key event counts and a session key event rate. A calculated metric becomes useful when you want a ratio GA4 does not offer, for example leads per engaged session. A formula like {Key events} / {Engaged sessions} with unit Standard gives a ratio between 0 and 1 (or above 1 if users fire several lead events in one session). Note that this counts all key events unless you filter the report to the lead event.

Net revenue after refunds

Formula: {Purchase revenue} - {Refund amount}, unit Currency. This is useful for ecommerce sites that send refund events and want one number for finance conversations. It only works if refunds are actually being tracked.

Margin from a custom cost metric

If you send product cost as an event-scoped custom metric (for example a parameter holding the cost of the items in a purchase), you can calculate gross margin: {Purchase revenue} - {Item cost}, where Item cost is your custom metric. This is the pattern Google uses in its own example, and it is where calculated metrics earn their place, because GA4 has no native cost-of-goods data.

A worked example with hypothetical numbers

Suppose, as a hypothetical, a store records 2,000 total users and 300,000 THB of purchase revenue in a month, with 20,000 THB in refunds. Revenue per user is 150 THB. Net revenue is 280,000 THB, so net revenue per user would be 140 THB. If you need that last figure every week, a single formula, ({Purchase revenue} - {Refund amount}) / {Total users}, gives it directly and saves you two slots compared with building each piece separately.

How many calculated metrics you can create: standard vs GA4 360

Google's limits are simple: up to 5 calculated metrics per standard property and up to 50 per 360 property. These limits are per property, not per account, so a business that runs separate properties for different sites gets separate allowances.

The low cap on standard properties changes how you plan. A few habits help:

  • Agree the list with the people who read the reports before creating anything.
  • Combine steps into one formula where the intermediate number is not needed on its own.
  • Use predefined GA4 metrics where they already exist, such as average purchase revenue per user or session key event rate.
  • Keep ratios that only one analyst needs in an exploration or Looker Studio instead.

One more rule applies on both tiers: you cannot reference a calculated metric inside another calculated metric. Each formula has to be written out from predefined and custom metrics, which is another reason to plan the combined formula from the start.

Where calculated metrics can be used

According to Google, calculated metrics are available in reports, explorations and the Google Analytics Data API.

Standard reports

You can add a calculated metric to a standard report through report customization (the pencil icon), under the metrics list. This requires Editor access to change saved reports, but once added, everyone who opens the report sees the column.

Explorations

In an exploration, calculated metrics appear in the metrics picker alongside predefined and custom metrics. This is where they are most flexible, because you can break them down by any dimension, segment or filter the exploration allows.

The Data API

When you query the Google Analytics Data API, a calculated metric is referenced by its API name in the form calcMetric: followed by the API name. Connectors that use the Data API can pull it the same way, which keeps the definition identical between GA4 and whatever reads from it. The Admin API also exposes calculated metrics as a resource, so they can be created and listed programmatically.

Calculated metrics vs custom metrics vs Looker Studio calculated fields

These three get confused because they all produce numbers you did not have before. The difference is where the number comes from and who can see it.

Calculated metrics vs custom metrics vs Looker Studio calculated fields
OptionWhere the number comes fromMain limit
GA4 calculated metricA formula over existing GA4 metrics, computed at query time inside GA45 per standard property, 50 per 360; no functions; cannot reference another calculated metric
GA4 custom metricA numeric event parameter you send in your tagging, registered in Custom definitionsOnly collects data from the moment it is registered and tagged
Looker Studio calculated fieldA formula inside a Looker Studio data source or chartOnly exists in that report; not visible in GA4 itself

A useful way to decide: if the raw number is not in GA4 at all (product cost, a lead score), you need a custom metric first. If the raw numbers are in GA4 and you want one agreed ratio everyone sees in GA4, use a calculated metric. If the number is only for one dashboard, or needs functions like CASE or rounding, use a Looker Studio calculated field.

Common errors: unit types and missing data

The wrong unit

With the wrong unit, the maths is correct but the report shows a baht sign on a rate or a bare number on revenue. Edit the metric and change the unit; the formula does not need to change.

Zero or blank results

If a calculated metric shows zero or no data, check the inputs before the formula. A ratio that uses refund amount will be empty if no refund events are sent. A custom metric used in the formula only has data from the time it was registered and collected, so a margin metric cannot reach back to months before you started sending cost. Division by zero in a row (for example a channel with no users) will also produce an empty value in that row.

Invalid metric references

If a metric used in the formula is later removed, for example an archived custom metric, the calculated metric is flagged as having an invalid reference. The Admin API marks this with an invalidMetricReference field, and Google notes that using such a metric may fail or give unexpected results. Fix the formula or delete the calculated metric.

Restricted data

Calculated metrics that use revenue or cost metrics inherit those data restrictions. The Admin API labels them with a restricted metric type of cost data or revenue data. Users whose role hides revenue or cost metrics will not see those values, which can look like missing data when it is really a permissions setting.

Mixing scopes

A formula that divides an event-level count by a user-level count is valid, but you need to be sure the ratio means what you think. "Purchases per user" over a 90-day range is not the same as an average of daily values. Write down what each calculated metric means in the description field so the next person reading the report does not have to guess.

What this means for businesses in Thailand

On a standard property, it is worth deciding the list as a team before anyone starts creating metrics, especially in agencies or companies where several people have Editor access.

Thai ecommerce sites that sell through their own website as well as marketplaces should also be clear about what GA4 can see. GA4 only measures the site and apps it is tagged on, so marketplace orders will not appear in purchase revenue unless they are brought in some other way. Revenue per user in GA4 is therefore revenue per website user, not per customer across all channels. If you need a cross-channel figure, the combining usually happens outside GA4, in a warehouse or dashboard that joins several sources.

Currency is the other practical point. Calculated metrics with the Currency unit display in the property's reporting currency, so set that to Thai baht (or the currency finance reports in) before you build revenue-based metrics.

FAQ

How many calculated metrics can I create in GA4?

You can create up to 5 calculated metrics on a standard GA4 property and up to 50 on a GA4 360 property. The limit is per property, so separate properties each get their own allowance.

Can I use a calculated metric inside another calculated metric?

No, Google does not allow a calculated metric to be referenced in another calculated metric's formula. Write the full formula from predefined and custom metrics instead.

Who can create GA4 calculated metrics?

Only users with the Editor or Administrator role on the property can create or edit calculated metrics. Other roles can still use them in reports and explorations.

Do GA4 calculated metrics work in Looker Studio?

Calculated metrics are available through the Google Analytics Data API, which is what GA4 connectors read from. Check that your connector lists the metric; if it does not, you can recreate the same formula as a Looker Studio calculated field.

Do calculated metrics apply to past data?

They are computed at query time from metrics GA4 already stores, so they work across any date range where the input metrics have data. A custom metric used in the formula only has data from the time you started collecting it.

Getting GA4 set up to answer the right questions

Calculated metrics are only as good as the events and custom metrics underneath them. If your GA4 property still needs its key events, ecommerce events or custom definitions sorted out, the GA4 setup and migration service covers that groundwork. When the numbers you need sit in several systems, such as GA4, a CRM and ad platforms, data integration and consolidation is the step that joins them. If CRM records also need to line up with GA4 data, see ERP and CRM integration.

Antonio Fernandez

Antonio Fernandez

Founder and CEO of Relevant Audience. With over 15 years of experience in digital marketing strategy, he leads teams across southeast Asia in delivering exceptional results for clients through performance-focused digital solutions.

Share to:
Copy link:

Read us often? Add Relevant Audience as a preferred source so our articles surface more in your Google results.