The most important thing with TSS is to be consistent. You probably have a good idea of how your legs feel right after a really mountain hike and then on the next day. Compare that feeling to how you feel after the stair machine and adjust TSS to account for the level of fatigue. After all TSS is just, as its name suggests (Training STRESS Score), a measure of the stress you’ve applied to your body.
I wish there was a simple formula and while I have suggested things like 10TSS / 1000ft of up and down, being consistent is the most important thing with any grading system.