Abstract: An electromagnetic wave analyzer and program which can handle non-uniform cells with smaller computation errors. A given computational domain is divided into a plurality of cells for the purpose of finite difference approximation. For each space point, a cell size identification unit identifies the uniformity of surrounding cells. When the surrounding cells are identified as being uniform in size, a first calculation unit calculates electromagnetic field components at that space point with a first calculation method. When the surrounding cells are identified as being non-uniform in size, a second calculation unit calculates the same with a second calculation method which has smaller computational errors than the first calculation method. A data output unit then outputs the calculated electromagnetic field values.