Use the built-in “Frequency per User” measurement in Insights. It calculates the number of events performed per user and lets you aggregate the per-user values (e.g., Average, distribution, median, percentiles, min, max). No custom formula is required. In an Insights report, pick your event, change the measurement from “Total Events” to “Frequency per User,” then choose the aggregation you want (Average is the default) (Insights / Measurements, Aggregate Property per User).