How to calculate market size in a right way: From TAM to SOM

How to calculate market size in a right way: From TAM to SOM