This work is aimed at the numerical modeling of the flow inside single and twin-screw extruders. Numerical solutions are obtained using a recently developed immersed boundary finite element method capable of solving the flow in the presence of complex non-stationary solid boundaries. The method is first validated against the solution obtained on a body-conforming grid for a single screw extruder and then applied to a twin-screw mixer. The time dependent single screw problem can also be solved in a rotating reference frame for which a steady state solution can be obtained. This allows the evaluation of time integration errors of the moving immersed interface algorithm. For instance the flow is considered isothermal and the material behaves as a Generalized Newtonian fluid. Because the viscosity depends on the shear rate, solutions will be shown for various rotation velocities of the screw and compared with solutions obtained on body-conforming grids. The method is shown to give very accurate results and can be used for a more in-depth investigation of the material behavior in extruders.