An in vivo dosimetry system, using p-type diode dosimeters, was characterized for clinical applications of treatment machines ranging in megavoltage energies. This paper investigates two different models of diodes for externally wedged beams and explains a new algorithm for the calculation of the target dose at various tissue depths in external radiotherapy. The values of off-axis wedge correction factors were determined at two different positions in the wedged (toward the thick and thin edges) and in the non-wedged directions on entrance and exit surfaces of a polystyrene phantom in 60Co and 6 MV photon beams. Depth transmission was defined on the entrance and exit surfaces to obtain the off-axis wedge correction factor at any depth. As the sensitivity of the diodes depends on physical characteristics [field size, source–skin distance (SSD), thickness, backscatter], correction factors were applied to the diode reading when measuring conditions different from calibration situations. The results indicate that needful correction factors for 60Co wedged photons are usually larger than those for 6 MV wedged photon beams. In vivo dosimetry performed with the proposed algorithms at externally wedged beams has negligible probable errors (less than 0.5&) and is a reliable method for patient dose control.