Hamilton's rule.

The kin selection advantage can be quantified by measuring 3 values.

The benefit to the recipient (B)

The cost to the altruist (C)

The coefficient of relatedness (r):

Kin selection favors altruism when rB > C.