What is the formula for tension??
There is no explicit formula for tension; it is basically a reaction force that occurs on strings, ropes, etc. in the opposite direction when you apply a force in some direction. You kind of have to consider the context first. Let's take this as an example.
If the Free-Body Diagram is drawn as follows:
Assuming static equilibrium, examining only the part of the string with the man on it (the exact center), and summing the forces in the y-direction (up = positive y, right = positive x):
So, if the person's mass was
Thus, to counter a downwards force of
Other more detailed examples can be found here. The ones with pulleys are the most difficult.