The improved method for calculation of a phase hologram and its application to laser writing of waveguides with a spatial light modulator are presented. It was found that the amplitude and phase distributions of light spots generated by a phase hologram can be distorted compared to those of a focused single beam. The distortion of light spots could be reduced by adding a simple constraint, in which light intensities around a light spot should be as small as possible, to the conventional calculation method of a phase hologram. It was also demonstrated that the improved calculation method can be considered essential for laser writing of waveguides.