Forces are calculated by taking the sum of forces and setting them equal to the net force which will equal zero.
It is important that a free body diagram is drawn to see all the forces acting on the object with tension applied to it. All the forces in the y and x directions should be equal to zero, and once the other forces have been identified, tension force can be found.