Trofaiach is a municipality in the Leoben district of the state of Styria in Austria. It lies in the eastern part of the state, in the valley of the Trofaiach Bach, a tributary of the Mur, roughly ten kilometres northwest of Leoben.
The town was the site of a displaced persons camp in the British sector of post-World War II Austria. On 1 January 2013, Trofaiach was merged with the neighbouring municipalities of Hafning bei Trofaiach and Gai, expanding the municipality to its present extent.
The municipality had 11,003 inhabitants on 1 January 2023. It is connected by road and rail to Leoben and the wider Mur valley, and the surrounding landscape is dominated by the forested foothills of the Eisenerz Alps.