Alloying elements play an important role in the design of plasma facing materials with good comprehensive properties. Based on first-principles calculations, the stability of alloying element W and its interaction with vacancy defects in Ta-W alloys are studied. The results show that W tends to distribute dispersedly in Ta lattice, and is not likely to form precipitation even with the coexistence of vacancy. The aggregation behaviors of W and vacancy can be affected by their concentration competition. The increase of W atoms has a negative effect on the vacancy clustering, as well as delays the vacancy nucleation process, which is favorable to the recovery of point defects. Our results are in consistent with the defect evolution observed in irradiation experiments in Ta-W alloys. Our calculations suggest that Ta is a potential repairing element that can be doped into Ta-based materials to improve their radiation resistance.