(DEALT) For example Full Tilt, Sun Poker, InterPoker, and Cake: Take the total rake collected, divided by the number of players at the table (i.e. $2 rake, divided by 10 = $0.20). Thus, on that hand you generated 20 cents even if you folded preflop. Then, 20 cents x # of hands you play in a month determines your MGR (rake) that you generate for the poker site.
(AVERAGE CONTRIBUTED) For example Ultimate Bet, Absolute Poker, and Action Poker: Players must contribute to the pot (even just 10 cents), in order to be credited for rake generation on that particular hand. The total rake is divided EVENLY by the number of players who contributed at least 10 cents to the pot (includes small blind and big blind). Therefore, let's say that Player #1 puts in $10, Player #2 puts in $60, and player 3 puts in $60. The total rake taken is $3. Each player has generated $1 in rake!
(WEIGHTED CONTRIBUTED) For other sites: Every player is credited rake from each pot according to how much he has put into the pot. For example, a pot’s size is $40 and the rake taken is $2. A player who contributed 10% of the pot (which in this case would be $4) would be considered as having generated 10% of the rake ($0.20). Players who do not contribute any stake into the pot he would not receive any credit.