Tumors can be treated with an alternating electric field. The size of cells in the tumor is determined prior to the start of treatment by, for example, biopsy or by inverse electric impedance tomography. A treatment frequency is chosen based on the determined cell size. The cell size can be determined during the course of treatment and the treatment frequency is adjusted to reflect changes in the cell size. A suitable apparatus for this purpose includes a device for measuring the tumor impedance, an AC signal generator with a controllable output frequency, a processor for estimating the size of tumor cells and setting the frequency of the AC signal generator based thereon, and at least one pair of electrodes operatively connected to the AC signal generator such that an alternating electric field is applied to the tumor.