Abstract A continuum phase field model is used to investigate the poling behavior of BaTiO 3 (BTO) thin films with thicknesses ranging from 1 nm–80 nm. The finite element simulations focus on the influence of the electrode material on the electrical hysteresis curves. The 15 nm thick electrodes consist of either SrRuO 3 (SRO) or Au and are explicitly included in the simulations. Experimental evidence suggests that there is a depolarization field in SRO-electroded BTO thin films. This depolarization field, which is due to an imperfect charge compensation by the electrodes, causes a suppression of ferroelectricity for film thicknesses of a few unit cells. The depolarization field and its effect on the electrical behavior is captured by a Robin type boundary condition for the order parameter of the phase field model. This boundary condition is applied at the interface between the thin film and the top and bottom electrode. The simulation results show that the overall poling behavior strongly depends on the lattice parameter of the electrode material. Films with SRO electrodes, which have a lattice parameter smaller than the a -parameter of tetragonal BTO, observe a switchable polarization larger than the spontaneous polarization. If Au is used (which has lattice parameter larger than the a -parameter of tetragonal BTO) then switching is inhibited for films which are less than 20 nm thick. It is also shown that the Robin boundary condition induces a depolarization field which has the effect of dramatically reducing the switchable polarization in ultrathin films.