K factor and viral coefficient: how to measure referral in a SaaS
The k factor is invites per user times the conversion rate of those invites. How to measure it in PostHog, and why a K below 1 still pays.
The k factor (or viral coefficient) is the number of new users each existing user brings in through invites: invites sent per user multiplied by the conversion rate of those invites. A K above 1 means every cohort recruits a bigger one and growth feeds itself. Most SaaS products sit well below 1, and that is fine: a K of 0.5 still doubles everything your other channels bring in.
The k factor formula
David Skok, a venture capitalist who writes about SaaS metrics, defines it in Lessons Learned: Viral Marketing by multiplying "the number of invitations by the conversion rate":
K = i × c
- i: average number of invites sent per user over a fixed period.
- c: share of those invites that turn into a new user over the same period.
An illustrative cohort (made-up numbers, to show the arithmetic):
| Step | Value |
|---|---|
| New users who signed up in September | 400 |
| Invites they sent within 30 days | 300 |
| Invites per user (i) | 300 / 400 = 0.75 |
| Invitees who signed up within 30 days | 45 |
| Invite conversion rate (c) | 45 / 300 = 15% |
| K | 0.75 × 0.15 = 0.11 |
The shortcut gives the same result: referred signups divided by the users who sent the invites, 45 / 400 = 0.11. Keep i and c separate anyway, because they call for different fixes. A low i is a prompting problem (users never see the invite, or never have a reason to send it). A low c is a landing problem (the invitee does not understand what they were invited to, or the signup is too long).
Why a K below 1 still matters
Skok is strict on the definition: "The Viral Coefficient must be greater than 1 to have viral growth." In his spreadsheet model, dropping the invite conversion rate to 5% pushes K under 1, and the user base "grows to 20 people, and then stops".
That is the right way to read a single seed of users. A SaaS that also runs ads, SEO and sales keeps feeding the loop with fresh users, and every one of them recruits a few more. Andrew Chen gives the multiplier in a post on retention and viral growth: 1 / (1 minus K). His example: with a viral factor of 0.5, "if you start with 1000 active users", you "end up with 2000 actives". He calls it "a 2x multiplier on everything else that's happening in the product".
Applying his formula to a few values of K:
| K | Multiplier on users from other channels |
|---|---|
| 0.1 | 1.11 |
| 0.2 | 1.25 |
| 0.33 | 1.5 |
| 0.5 | 2 |
| 0.8 | 5 |
Referral deserves a line in your funnel even when nobody would call the product viral. Moving K from 0.2 to 0.3 on 1,000 signups a month from other channels takes total signups from 1,250 to about 1,429: roughly 179 extra users a month that cost no ad spend. Pricing the gap that way lets you compare a referral project with an onboarding fix or a pricing test on the same scale.
Chen's post makes a second point that matters for SaaS: users share across sessions, so K grows with retention. His illustration is a viral factor of "0.2 on the first session, then 0.3 on the 5th session". A product people open every day gets more chances to ask for an invite than one they open once a month.
Viral cycle time, the half the k factor hides
K tells you how much each loop multiplies. It says nothing about how fast the loop turns. Skok calls that the viral cycle time, "the time that it takes for this cycle to complete", and argues it matters more than K: "The Viral Coefficient K is raised to the power of t/ct, so reducing ct has a far more powerful effect than increasing K."
His model shows the scale of the effect. With a two-day cycle, it reaches 20,470 users after 20 days. Halve the cycle to one day and the same model passes 20 million.
In a SaaS, cycle time is the delay between a user's signup and the signup of the people they invite. It is long when the invite only makes sense once the user has seen value (a shared report after the first month), and short when inviting is part of the first session (adding a teammate to a project). Measure it as the median number of days between the two signups, and report it next to K.
How to measure the k factor in PostHog
The standard PostHog funnel insight follows one person through a series of steps. A referral loop involves two people (the one who invites and the one who signs up), so K takes three pieces: two events with the right properties, one funnel on the invitee's side, and one SQL query to join the two.
- Track the invite. Send an event such as
invite_senteach time a user invites someone, with aninvite_typeproperty (teammateorexternal). PostHog lists invitations and shares among the five events every team should track, and recommends tracking referrals and acceptance separately. - Carry the referrer to the signup. Put the inviter's ID in the invite link, send an
invite_link_openedevent when the invitee lands, keep the ID through the signup form, and send it as areferrer_idproperty on yoursigned_upevent. - Identify at signup. Call
identifyright after the account is created. PostHog's identify docs explain that it "merges the anonymous person into the identified person", so the invitee's visit to the invite page and their signup end up on the same person. - Build the invitee funnel. A funnel from
invite_link_openedtosigned_upgives the second half of c, and the "time to convert" view shows where invitees stall. Pin the conversion window explicitly: PostHog's conversion metrics guide calls it "the parameter people most often forget to pin down". - Compute K with SQL. Count referred signups and new users over the same window in the SQL editor. A rolling 30-day approximation looks like this:
SELECT
countIf(event = 'signed_up' AND properties.referrer_id IS NOT NULL) AS referred_signups,
countIf(event = 'signed_up') AS all_signups,
countIf(event = 'invite_sent' AND properties.invite_type = 'external') AS external_invites
FROM events
WHERE timestamp > now() - INTERVAL 30 DAY
Referred signups divided by all signups is a rough K for the period (it converges to K when signups are steady, since referred users make up K of the total), and external invites divided by all signups gives i. The cohort version (only invites sent by users who signed up in a given month, only signups within 30 days of the invite) needs a join on the referrer's signup date. Test either query on your own events before you trust the number.
Three ways the k factor misleads a B2B team
Teammate invites inflate it. In a collaborative tool, most invites go to colleagues of the same company. They add seats, sometimes revenue, but no new account. Report K on external invites only, and track teammate invites as an activation or expansion signal instead.
It misses most word of mouth. A user who recommends the product at a meetup produces a signup with no referrer ID. Dropbox is the classic illustration: in Drew Houston's 2010 deck, 35% of daily signups came from the referral program and another 20% from "shared folders, other viral features", two loops that need separate tracking. Add a "how did you hear about us" field to your signup to estimate the part K cannot see.
Incentives change what you measure. Dropbox's two-sided incentive "permanently increased signups by 60%", according to the same deck. A reward also raises i with low-intent invites, which can lower c. When you add or change an incentive, compare K, i and c before and after, and watch the retention of referred users: a referred user who leaves in the first month adds nothing to the loop.
What is a good k factor?
No public benchmark holds up. Vendor guides quote ranges for B2B SaaS, but none says how the companies in the sample counted invites, which window they used, or whether teammate invites were included. Dropbox, one of the most cited referral stories, published its signup share and growth rate, not its K.
Use your own history as the benchmark. Track K, i, c and cycle time by monthly cohort, and judge a change by its effect on the next cohorts. When you decide where to work, pick the weakest of the three:
- i is low (most users never invite): place the invite where the product needs another person, such as sharing a report or assigning a task, and ask again in later sessions.
- c is low (invites go out but few convert): rewrite the page an invitee lands on so it shows who invited them and what they will see after signup, and shorten that signup.
- Cycle time is long: move the first invite prompt earlier, into the first session if the product allows it.
Then price the gain with the 1 / (1 minus K) multiplier and compare it with your other options for the week.
Frequently asked questions
Is the k factor the same as the viral coefficient?
Yes. Both names describe the same number: the average count of new users each existing user brings in through invites, calculated as invites sent per user multiplied by the share of those invites that become users. Some teams say k factor, others viral coefficient or viral factor. The formula does not change.
What is a good k factor for a B2B SaaS?
There is no public benchmark worth citing, because every company counts invites, windows and teammate seats differently. Compare your K with your own previous cohorts instead. Any K above zero multiplies your other channels by 1/(1 minus K): 0.2 gives 25% more users, 0.5 doubles them.
Do teammate invites count in the k factor?
Count them separately. A teammate invited into an existing workspace adds a user but rarely a new paying account, so mixing those invites with invites to people outside the company inflates K. Tag each invite with its type and compute one K for new accounts, which is the one that drives acquisition.
Sources
- David Skok, Lessons Learned: Viral Marketing (For Entrepreneurs): https://www.forentrepreneurs.com/lessons-learnt-viral-marketing/
- Andrew Chen, Why the best way to drive viral growth to increase retention and engagement: https://andrewchen.com/more-retention-more-viral-growth/
- Drew Houston, Dropbox: Startup Lessons Learned (slides, 2010): https://www.slideshare.net/slideshow/dropbox-startup-lessons-learned-3836587/3836587
- PostHog, 5 events all teams should track with PostHog (October 2022): https://posthog.com/blog/events-you-should-track-with-posthog
- PostHog docs, Identifying users: https://posthog.com/docs/product-analytics/identify
- PostHog docs, Funnels: https://posthog.com/docs/product-analytics/funnels
- PostHog, Conversion metrics (Data Stack pocket guide): https://posthog.com/pocket-guides/data-stack/conversion-metrics
- PostHog docs, SQL access in PostHog: https://posthog.com/docs/sql