Получается, что ... is the result of mental arithmetic in someone's mind.
Similar to "I have made it out", "It turns out, that..."
Hastings or dr.Watson could pronounce "но тогда получается, что..." after Poirot/Holmes had made the explanations and they arranged new data in their heads, and started to understand something, and even started to do some deduction.