Dose calculation in radiotherapy aims to accurately estimate and assess the dose distribution of a treatment plan. Monte Carlo (MC) dose calculation is considered the gold standard owing to its ability to accurately simulate particle transport in inhomogeneous media. However, uncertainties such as the patient's dynamically deforming anatomy can still lead to differences between the delivered and planned dose distribution. Development and validation of a deformable voxel geometry for MC dose calculations (DefVoxMC) to account for dynamic deformation in the dose calculation process of photon- and electron-based radiotherapy treatment plans for clinically motivated cases. DefVoxMC relies on the subdivision of a regular voxel geometry into dodecahedrons. It allows shifting the dodecahedrons' corner points according to the deformation in the patient's anatomy using deformation vector fields (DVF). DefVoxMC is integrated into the Swiss Monte Carlo Plan (SMCP) to allow the MC dose calculation of photon- and electron-based treatment plans on the deformable voxel geometry. DefVoxMC is validated in two steps. A compression test and a Fano test are performed in silico. Delta4 (for photon beams) and EBT4 film measurements in a cubic PMMA phantom (for electron beams) are performed on a TrueBeam in Developer Mode for clinically motivated treatment plans. During these measurements, table motion is used to mimic rigid dynamic patient motion. The measured and calculated dose distributions are compared using gamma passing rate (GPR) (3% / 2mm (global), 10% threshold). DefVoxMC is used to study the impact of patient-recorded breathing motion on the dose distribution for clinically motivated lung and breast cases, each prescribed 50Gy to 50% of the target volume. A volumetric modulated arc therapy (VMAT) and an arc mixed-beam radiotherapy (Arc-MBRT) plan are created for the lung and breast case, respectively. For the dose calculation, the dynamic deformation of the patient's anatomy is described by DVFs obtained from deformable image registration of the different phases of 4DCTs. The resulting dose distributions are compared to the ones of the static situation using dose-volume histograms and dose differences. DefVoxMC is successfully integrated into the SMCP to enable the MC dose calculation of photon- and electron-based treatments on a dynamically deforming patient anatomy. The compression and the Fano test agree within 1.0% and 0.1% with the expected result, respectively. Delta4 and EBT4 film measurements agree with the calculated dose by a GPR>95%. For the clinically motivated cases, breathing motion resulted in areas with a dose increase of up to 26.9Gy (lung) and up to 7.6Gy (breast) compared to the static situation. The largest dose differences are observed in high-dose-gradient regions perpendicular to the beam plane, consequently decreasing the planning target volume coverage (V95%) by 4.2% for the lung case and 2.0% for the breast case. A novel method for MC dose calculation for photon- and electron-based treatments on dynamically deforming anatomy is successfully developed and validated. Applying DefVoxMC to clinically motivated cases, we found that breathing motion has non-negligible impact on the dosimetric plan quality.