For intel Tj max is 100 degrees C and it's not calculated but there is a probe inside the CPU that tells the CPU but also any software that asks what the current temp is.
As drechsler said it's basically a little below the failure point which is 110 for intel, at 100 the CPU throttles down hard to keep from reaching higher.
Tj max is the temp of the whole die measured at a specific point and not the individual cores, the core temp is just that the temp of the cores.