There is clinical evidence that second malignancies in radiation therapy occur mainly within the beam path, i.e. in the medium or high-dose region. The purpose of this study was to assess the risk for developing a radiation-induced tumor within the treated volume and to compare this risk for proton therapy and intensity-modulated photon therapy (IMRT). Instead of using data for specific patients we have created a representative scenario. Fully contoured age- and gender-specific whole body phantoms (4 year and 14 year old) were uploaded into a treatment planning system and tumor volumes were contoured based on patients treated for optic glioma and vertebral body Ewing's sarcoma. Treatment plans for IMRT and proton therapy treatments were generated. Lifetime attributable risks (LARs) for developing a second malignancy were calculated using a risk model considering cell kill, mutation, repopulation, as well as inhomogeneous organ doses. For standard fractionation schemes, the LAR for developing a second malignancy from radiation therapy alone was found to be up to 2.7% for a 4 year old optic glioma patient treated with IMRT considering a soft-tissue carcinoma risk model only. Sarcoma risks were found to be below 1% in all cases. For a 14 year old, risks were found to be about a factor of 2 lower. For Ewing's sarcoma cases the risks based on a sarcoma model were typically higher than the carcinoma risks, i.e. LAR up to 1.3% for soft-tissue sarcoma. In all cases, the risk from proton therapy turned out to be lower by at least a factor of 2 and up to a factor of 10. This is mainly due to lower total energy deposited in the patient when using proton beams. However, the comparison of a three-field and four-field proton plan also shows that the distribution of the dose, i.e. the particular treatment plan, plays a role. When using different fractionation schemes, the estimated risks roughly scale with the total dose difference in%. In conclusion, proton therapy can significantly reduce the risk for developing an in-field second malignancy. The risk depends on treatment planning parameters, i.e. an analysis based on our formalism could be applied within treatment planning programs to guide treatment plans for pediatric patients.