The FIP formula equals ((13HR)+(3(BB+HBP))-(2K))/IP + constant. HR stands for home run, BB for a walk, HBP for hit by pitch, K for strikeout and IP indicates innings pitched. The constant is used to bring the FIP up to the same scale as ERA, and is around 3.10. To find the constant for any year, you must know the league average in ERA, HR, BB, HBP, K and IP. The constant can the be found by using this formula: lgERA – (((13lgHR)+(3(lgBB+lgHBP))-(2lgK))/lgIP).
If a pitcher has allowed five homers, 10 walks and two hit by pitches while striking out 10 over 40 innings pitched with a constant of 3.10, you can find his FIP by using the calculation FIP = ((135)+(3(10+2))-(2*10))/40 + 3.10. His FIP would be 5.13.