1.Click the “Admin” gear icon at the bottom left. In the view column, click calculated metrics.

2. Click +New calculated metric. Pay attention to the limit at the bottom left.

3. Fill out the following forms

Name
Give your calculated metric as name, preferably a descriptive one as it will make it easier for others to understand what the metric aims to measure. For example, we can create one for ‘pageviews per user’ and enter that phrase in the name field. You can edit the name any time after it’s created.
External name
The external name is only relevant if you’re plugging Google Analytics into an external application with its API. The external name will autopopulate based on the name and it’s best to just leave it as it is, as it needs to be equally descriptive. It’s permanent so choose wisely.
Formatting Type
Choose the most appropriate data format for your chosen calculated metric: integer, float, time, percent, or currency. Integers are whole numbers, floats are decimals, the rest are self-explanatory. In our pageviews per user example the most suitable formatting type would be float so you can have a more precise reading like 1.24 instead of just 1.
Formula
Enter the formula for your desired calculation. In our example we will divide the number of pageviews by the number of users.

4. Click save.
5. Now to put your new calculated metric into use. Click custom reports under the customization tab.

6. Add ‘pageviews per user’ or whatever your new calculated metric is called under metric groups. Add the dimension of your choice, like city in our example. Click save.
7. You’ll now see your new custom report complete with your chosen dimension in the first column and your new calculated metric in the second.

Do take note that this is the only place where you will be able to access your calculated metrics as they’re not available in the predefined reports of Google Analytics.
Examples of useful calculated metrics
Average User Duration
Formula: {{Session Duration}} / {{Users}}
If you understand how Google Analytics calculates a session, you’ll know why the default pageviews per session metric makes little sense. Google Analytics defines a session as being under 30 minutes long so if a user uses your site for an hour and a minute it will count as three sessions. This can lead to wide and misleading discrepancies between the number of users and the number of sessions.
Calculating average user duration makes more sense in this instance, as it gives a more accurate representation of the time each user spent on your site.
Average Events per User
Formula: {{Total Events}} / {{Users}}
It’s a mystery why this one doesn’t already exist in Google Analytics; calculating the average number of events per user is useful to just about every webmaster. Events can be defined as anything from clicks and pagescrolls to landing on specific URLs and form submissions. You need to set up events yourself for this one to start measuring anything.
