You can start by this paper : https://genomemedicine.biomedcentral.com/articles/10.1186/s13073-017-0424-2
In the method part :
TMB was defined as the number of somatic, coding, base substitution, and indel mutations per megabase of genome examined.
Note that the human exome size is ~30Mb. So you can take the number of somatic mutations in a given tumor sample an divide that by 30 to obtain the Mut/Mb value (normally > 4-6 is considered 'hyper mutation')
Or maybe you can try this tool
Just to add a little more confusion to this topic, there is another method implemented in Varlociraptor:
Varlociraptor enables an uncertainty aware computation of the tumor mutational burden (TMB). TMB is usually defined as the number of somatic, non-synonymous coding mutations per megabase of the measured coding genome. ... the TMB is calculated as expected value over the posterior probabilities for each variant to be somatic. Hence, the TMB estimate properly considers the uncertainty in the data. Moreover, as we show a TMB estimate for each minimum allele frequency, it becomes possible to reason over the clonal structure of the tumor, instead of considering only a single overall number. We expect this to increase the predictive power of the TMB.