Based on the characteristics of the interactions between intermediate energy heavy-ion beam and target matter, a method to calculate the depth-dose distribution of heavy-ion beams with intermediate energy (10-100 MeV/u) is presented. By comparing high energy beams where projectile fragmentation is overwhelming with low energies where energy straggling is the sole factor instead, a crescent energy spread with increasing depth and a simple fragmentation assumption were included for the depth-dose calculation of the intermediate energy beam. Relative depth-dose curves of carbon and oxygen ion beams with intermediate energies were computed according to the method here. Comparisons between the calculated relative doses and measurements are shown. The calculated Bragg curves, especially the upstream and downstream Bragg peaks, agree with the measured data. Differences between the two results appear only around the peak regions because of the limitations of the calculation and experimental conditions, but the c