A simple and convenient method to deal with floating conductors in electrostatic field when using finite element method (FEM) is presented. A method to extract capacitance matrix that includes the effect of floating conductors inside the solution domain is also put forward. The merits are that the computing time can be reduced; and users only need to set up the capacitance extraction on the ports where they have interests, and the effect of other floating conductors will be automatically taken into account.