The aim of this study is to perform a direct comparison of the source model for photon beams with and without flattening filter (FF) and to develop an efficient independent algorithm for planar dose calculation for FF-free (FFF) intensity-modulated radiotherapy (IMRT) quality assurance (QA). The source model consisted of a point source modeling the primary photons and extrafocal bivariate Gaussian functions modeling the head scatter, monitor chamber backscatter, and collimator exchange effect. The model parameters were obtained by minimizing the difference between the calculated and measured in-air output factors (Sc). The fluence of IMRT beams was calculated from the source model using a backprojection and integration method. The off-axis ratio in FFF beams were modeled with a fourth degree polynomial. An analytical kernel consisting of the sum of three Gaussian functions was used to describe the dose deposition process. A convolution-based method was used to account for the ionization chamber volume averaging effect when commissioning the algorithm. The algorithm was validated by comparing the calculated planar dose distributions of FFF head-and-neck IMRT plans with measurements performed with a 2D diode array. Good agreement between the measured and calculated Sc was achieved for both FF beams (<0.25%) and FFF beams (<0.10%). The relative contribution of the head-scattered photons reduced by 34.7% for 6 MV and 49.3% for 10 MV due to the removal of the FF. Superior agreement between the calculated and measured dose distribution was also achieved for FFF IMRT. In the gamma comparison with a 2%/2 mm criterion, the average passing rate was 96.2 ± 1.9% for 6 MV FFF and 95.5 ± 2.6% for 10 MV FFF. The efficient independent planar dose calculation algorithm is easy to implement and can be valuable in FFF IMRT QA.