Multifocal microscopy (MFM) offers high-speed three-dimensional imaging\nthrough the simultaneous image capture from multiple focal planes. Conventional\nMFM systems use a fabricated grating in the emission path for a single emission\nwavelength band and one set of focal plane separations. While a Spatial Light\nModulator (SLM) can add more flexibility, the relatively small number of pixels\nin the SLM chip, cross-talk between the pixels, and aberrations in the imaging\nsystem can produce non-uniform intensity in the different axially separated\nimage planes. We present an in situ iterative SLM calibration algorithm that\novercomes these optical- and hardware-related limitations to deliver\nnear-uniform intensity across all focal planes. Using immobilized gold\nnanoparticles under darkfield illumination, we demonstrate superior intensity\nevenness compared to current methods. We also demonstrate applicability across\nemission wavelengths, axial plane separations, imaging modalities, SLM\nsettings, and different SLM manufacturers. Therefore, our microscope design and\nalgorithms provide an alternative to fabricated gratings in MFM, as they are\nrelatively simple and could find broad applications in the wider research\ncommunity.\n