In this paper, the equilibrium behavior of an immiscible two phase fluid on a rough surface is studied from a phase field equation derived from minimizing the total free energy of the system. When the size of the roughness becomes small, we derive the effective boundary condition for the equation by the multiple scale expansion homogenization technique. The Wenzel and Cassie equations for the apparent contact angles on the rough surfaces are then derived from the effective boundary condition. The homogenization results are proved rigorously by the F-convergence theory. © 2010 Society for Industrial and Applied Mathematics.