A Monte Carlo test particle code is used to calculate the temperature difference between the central cell and end cell of a tandem mirror. The electron power input is through drag of hot ions in the end cell. It is found that the temperature difference increases as the mean free path becomes comparable to the system length. At long mean free paths, the temperature difference agrees with a previous analytical model. The calculation explains the temperature variation measured in the TMX experiment.