By guessing, then testing, then refining, testing, refining... repeat until it feels right. Then you can look for patterns. Sure, you could do some math and hope for the best, but with so many gameplay defining factors that you couldn't possibly think of, I think you're better off hand-crafting and playing various scenarios by yourself. Build your world and know how you want your players to progress through the levels: Diablo style or Dark Souls style. Do some thinking man.