Calculated Metrics in GA4: How to Create and Use Them

Calculated Metrics in GA4: How to Create and Use Them: GA4 & analytics article cover from AnalyticsLiv

In short

Calculated metrics in GA4 let you build a new metric from existing ones with simple maths, such as average order value from {Purchase revenue} / {Transactions}. Create them in Admin > Custom definitions > Calculated metrics. They work in reports, explorations and the Data API. A standard property allows 5 and a 360 property allows 50.

Contents5 sections

Talk to a specialist

GA4’s standard metrics don’t always answer the question you have. Calculated metrics let you build your own metric from the ones GA4 already has, such as a custom conversion rate or an adjusted average order value. This guide shows how to create them, gives example formulas and lists the limits to know first.

What are calculated metrics in GA4?

Calculated metrics are user-defined metrics derived from existing metrics in GA4. You apply simple maths to standard or custom metrics to get a new number that fits your business, for example a custom conversion rate for a campaign or an adjusted average order value.

You can use calculated metrics in reports, in explorations and in the Google Analytics Data API.

How do you create a calculated metric in GA4?

You need the Editor role or above on the property.

1. Open your GA4 property

Sign in to Google Analytics and select the GA4 property where you want the calculated metric.

2. Go to Custom definitions

In Admin, open Custom definitions and select the Calculated metrics tab.

Custom definitions in GA4 Admin

3. Define your calculated metric

Click “Create calculated metric”.

Calculated metrics tab with the Create calculated metric button

Fill in the following fields:

Calculated metric fields: name, API name, description, formula and unit

The Name field is mandatory. A clear, short name helps anyone reading the report understand the metric. The API name is auto-generated and serves as a unique identifier for the calculated metric when queried through the API. It can contain only letters, numbers and underscores. The API name must be unique and cannot be modified later.

While the Description field is optional, we recommend providing additional context to users by adding a description. This information becomes visible as a helpful tip when users hover over the metric in the reports.

The Formula field holds the calculation. Put metric names in curly brackets, for example {Purchase revenue}, and use the operators +, -, * and /. Parentheses set the order of operations, following the normal order in maths. Square brackets don’t work. A formula can use standard and custom metrics, but not another calculated metric, and it is limited to 1,024 characters.

The Unit of measurement sets how the value is displayed in reports. There are four categories: Standard, Currency, Distance (feet, miles, metres, kilometres) and Time (milliseconds, seconds, minutes, hours).

4. Save it

Save the calculated metric. After a few minutes it is available in your reports and explorations.

A saved calculated metric in GA4

Calculated metric formula examples

MetricFormula
Shipping as a share of revenue{Shipping amount} / {Purchase revenue}
Average order value{Purchase revenue} / {Transactions}
Key events per session{Key events} / {Sessions}

What are the limits of calculated metrics?

  • Up to 5 calculated metrics per standard property and 50 per GA4 360 property.
  • A formula can’t include another calculated metric.
  • Formulas are limited to 1,024 characters.
  • The API name can’t be changed after you save.

How do you get the most from calculated metrics?

  • Know your data: understand GA4’s standard metrics and how they relate to your business goals before you build new ones.
  • Start with a clear goal: know what you want to learn, for example customer acquisition cost or the value of a customer segment.
  • Keep formulas simple: complex calculations are easy to misread.
  • Review them regularly: as your business changes, update or replace metrics that are no longer useful. With only 5 slots on a standard property, this matters.
  • Explain them to your team: use the description field so everyone reads the metric the same way.

Calculated metrics also work well in customized GA4 reports. If you want help defining the metrics your team reports on, see our Google Analytics 4 consulting service.

Frequently asked questions.

Ask us your own question

Up to 5 on a standard property and 50 on a GA4 360 property.

In Admin, open Custom definitions, select the Calculated metrics tab and click Create calculated metric. You need the Editor role or above.

No. A formula can use standard and custom metrics only, written in curly brackets, and is limited to 1,024 characters.

Need help with GA4?

Talk to the team that sets up, audits and fixes GA4 and Tag Manager for clients.