Probably the surest way to determine the cost of your roof installation is to hire a contractor. However, when you go the professional route, you typically pay a premium, so be prepared.
If budget is a concern, you can always roll up your sleeves and break out your DIY guidebooks. The disadvantage there, of course, is that the cost becomes much harder to lock down. There exist many online calculators that can tell you how much you should expect to spend on materials given the size, slope, and location of your roof, but these only provide rough estimates. What many of these calculators do not factor in are two unrelated costs that go into roof installation--namely, time and mistakes.
Lastly, remember that costs and benefits are two sides of the same coin. No online calculator can possibly estimate the personal satisfaction that you receive from a job well done. If you are genuinely passionate about DIY projects and want something to show to your kids and their kids, then even the most accurate online roofing calculator will overestimate the true "cost" of your roofing project.