Rating loss and gain is dependent on the rating of the opponent (or tactic, if you are asking about that), you rating, and the respective RD (rating deviation) of each.
For tactics, time taken also plays an integral part.