Hybrid Formulas
A Hybrid Formula is a formula metric that combines event inputs and session inputs in a single arithmetic expression. Before Hybrid Formulas, formula metrics in Amplitude combined only event inputs, so analyses like Add to Carts per Session or Revenue per Session required two separate charts and a manual calculation.
Hybrid Formulas work in Data Tables and in the Metric Explorer chart.New formula builder
Hybrid Formulas ship with a redesigned formula builder. Compared to the previous event-only formula builder, the new builder adds:
- A unified Measured as selector that lets each input choose between event-level measurements (uniques, totals, property sum, and others) and session-level measurements (Session Totals, Bounce Rate, First Property Value, Last Property Value, and others) in one place, without switching builders.
- Real-time validity feedback. Amplitude validates the formula expression as you type and shows which inputs are unresolved or incompatible, so you don't have to save the metric to find out it's broken.
- Inline access to session inputs alongside event inputs, with each input labeled by type.
- Bidirectional conversion between event-only formulas and Hybrid Formulas. Opening a saved event-only formula in the Hybrid Formula builder loads it with zero session inputs. You can add session inputs and save without losing your event inputs, and you can convert back.
- A consistent input-naming scheme. Event inputs start at
A, and session inputs start atS, so the formula expression reads predictably.
The new builder appears wherever Hybrid Formulas work. Event-only formulas built in the legacy builder keep working unchanged, and the legacy builder remains available on surfaces that don't yet support Hybrid Formulas.
Where Hybrid Formulas work
Updated regularly
Amplitude updates this support table as Hybrid Formulas roll out to more surfaces. Check back if a surface you need isn't listed.
| Surface | Supported? |
|---|---|
| Data Tables | Yes |
| Metric Explorer | Yes |
| Saved metric library (reuse across charts) | Yes |
| Event Segmentation | No — continues to use the standard (event-only) formula path |
| User Sessions | No — use a session metric directly |
| Funnels, Retention, Pathfinder | No |
| Experiments | No |
Surfaces that don't yet support Hybrid Formulas keep working as they did before. Amplitude adds support to more surfaces on the regular release cadence.
Create a Hybrid Formula
In Data Tables
- In a Data Table, click + Add column, then Create metric, and then Hybrid Formula.
- Add event inputs. Each event input has a letter (
A,B, and so on) and its own measurement (uniques, totals, property sum, and others). - Add session inputs. Each session input has a letter starting at
S(S,T, and so on) and its own session-scoped measurement (Session Totals, Bounce Rate, Average Session Duration, and others). - Write the formula expression using the input letters, for example,
A / S. - (Optional) Click Save metric to add the Hybrid Formula to the saved metric library so you can reuse it across Data Tables and Metric Explorer charts.
In Metric Explorer
- In a Metric Explorer chart, click + Add metric, then Create metric, and then Hybrid Formula.
- Add event inputs. Each event input has a letter (
A,B, and so on) and its own measurement (uniques, totals, property sum, and others). - Add session inputs. Each session input has a letter starting at
S(S,T, and so on) and its own session-scoped measurement (Session Totals, Bounce Rate, Average Session Duration, and others). - Write the formula expression using the input letters, for example,
A / S. - (Optional) Click Save metric to add the Hybrid Formula to the saved metric library so you can reuse it across Data Tables and Metric Explorer charts.
Common examples
| Goal | Inputs | Expression |
|---|---|---|
| Revenue per Session | A = sum of revenue on Purchase, S = Session Totals | A / S |
| Add to Carts per Session | A = uniques of Add to Cart, S = Session Totals | A / S |
| Sessions per User | S = Session Totals, U = uniques of Any Active Event | S / U |
| Page Views per Session | A = totals of Page View, S = Session Totals | A / S |
| Bounce-adjusted conversion rate | A = uniques of Purchase, S = Session Totals, B = Bounce Rate | A / (S * (1 - B)) |
Measurement reference
When you add an input to a Hybrid Formula, the Measured as selector sets how Amplitude measures it. The selector offers the same measurements available on event and session metrics elsewhere in Amplitude. Choosing a measurement from the Session group treats that input as a session metric; any other measurement keeps the input as an event metric.
Main
| Measured as | What it returns |
|---|---|
| Unique Users | Distinct active users who triggered the event |
| Event Totals | Total number of event occurrences |
| % of Active Users | Share of active users who triggered the event |
| Average Events per User | Event totals divided by unique users |
| Frequency | Distribution of per-user event counts |
Properties
| Measured as | What it returns |
|---|---|
| Sum, average, median, min, or max of property value | Aggregation of a numeric event property |
| Distribution of property value | Histogram of a property's values, or of how often each value occurs |
Session
| Measured as | What it returns |
|---|---|
| Session Totals | Total number of sessions |
| Average Sessions per User | Sessions divided by unique users |
| Events per Session | Event totals divided by sessions |
| Bounce Rate | Share of sessions with a single qualifying event |
| Entry Rate or Exit Rate | Share of sessions that start or end on the grouped value |
| Average Session Duration | Total session duration divided by sessions |
| Time Spent per User | Total session duration divided by unique users |
| Distribution of Session Length | Histogram of session durations |
| First Property Value or Last Property Value | First or last value of a property within the session |
Revenue
| Measured as | What it returns |
|---|---|
| Revenue | Total of the event's revenue property |
| Average Revenue per Active User (ARPAU) | Revenue divided by unique active users |
ARPAU, REVENUETOTAL, or PROPSUM — refer to Custom formulas in Amplitude Analytics.Filters and group-bys
Hybrid Formulas honor the same filter and group-by scoping rules as the surface where you use them:
- In Data Tables, refer to Use session metrics in Data Tables.
- In Metric Explorer, refer to Group-by scoping.
Global filters on a Data Table apply to both the event and session inputs of a Hybrid Formula.
Conversion from event-only formula metrics
Existing event-only formula metrics keep working unchanged. If you open a saved event-only formula in the Hybrid Formula builder, it loads as a Hybrid Formula with zero session inputs. You can convert back and forth without losing inputs.
FAQ
Why can't I use a Hybrid Formula in the Event Segmentation chart?
Event Segmentation continues to use the standard event-only formula path, so existing charts never enter a broken state. To analyze a Hybrid Formula in a segmentation-style view, use Metric Explorer.Can I use a Hybrid Formula in an Experiment?
Not yet. Experiments excludes Hybrid Formulas from the metric picker. Check back as Hybrid Formulas roll out to more surfaces.
Can I export a Hybrid Formula's data?
In Data Tables, yes — use the Data Table export. Metric Explorer doesn't support export yet.
Does this work in the EU Data Center?
Yes.
Was this helpful?