You can find formulas or even on line calculators for deflection in an mechanics textbook, but there is an easier way to handle this. If you measure the deflection at the center of the beam, and divide the length (you need to use the same units, typically inches) by the deflection, you will get a value known as l/d. For example, if your header is 10 feet long (120 inches), and the deflection at the center is 1/2 inch, your l/d = 120/.5 = 240. Typically the minimum allowable value is 180 for structural members. If you are supporting a floor that is going to be tiled, you want a minimum of 240. If you are using sensitive tiles, like large porcelain tiles, you want a minimum of 480. If you are using natural stone tile, you want 720.
The l/d value is usually called the stiffness of the beam. So you measure the deflection using the string technique, divide the length by the deflection, calculate the stiffness, if it is not large enough, you worry about what to do next.