Hello Jose,
Wouldn't it be nice if all costs were as cut and dry as what you see in the supermarket? Unfortunately, when it comes to rehabbing a house, costs are as far from cut and dry as you can get. Yes, the materials are relatively straightforward. If you need to carpet 250 square feet, you can easily get some solid numbers. But when you delve into hiring a company that specializes in a particular area (i.e., roofs), the costs vary from contractor to contractor. One contractor will quote you $12,000 while the next will say it's going to be at least $26,000.
The best way to go about learning how to estimate such costs is to have multiple contractors come out and give you bids. Having multiple contractors provides you a general range of what it might cost. While the contractor is there, that's when you start asking them what goes into the estimate and how they came to that number. Most contractors will gladly explain what they feel needs to be done. When you have two or three contractors who explain their process, you can generally deduce what absolutely needs to be done, and what each contractor does on top of or below that.
I, for instance, had one a/c guy quote me $7,000 for a job. I asked what needed to be done and he kind of skirted around the question. "Oh ... the units aren't up to code, and the vents should be moved away from the windows." I then asked if the new units were included in his estimate. He provided a response that did not answer my question. I then asked how much the new, code-appeasing units were. He again skirted the question. The second a/c guy that came in quoted $2,600. He walked me through the property and showed me precisely what he would do and explained how his estimate came to fruition. He explained that the current units were brand new, they just hadn't been used since they were installed and that the code inspectors were not going to worry about it. They just needed to be connected. This guy had been in the a/c business for 20+ years.
The best way to learn how estimates come into play is to get out there, talk to professionals, and ask them questions. Most of them will give you a summary of what needs to be done, but you can always ask them to walk you through their process. I do this with everyone I hire. I have learned how to install P-traps, how to wire breaker boxes, and how to re-run ductwork.
Learning how to do these things also clues you in to when a contractor is saying you need unnecessary work. If they say you need X, ask why, then verify. I don't like calling out contractors on the spot because maybe they know something I don't. If they say something that I don't agree with, I generally nod, then look into it. For instance, I had a contractor bring out a plumber. He wasn't licensed but my contractor was getting annoyed waiting for a licensed company to get out there and assured me this unlicensed plumber knew what he was doing. I told him I would pay a small deposit, the remainder contingent on a licensed company giving it a thumbs up. This plumber came in and installed washer and dryer outlets and moved the main lines for the water heaters. He used SharkBite connectors instead of brass connectors, and he didn't put in P-traps on the washer connections. Three separate licensed plumbers came out, and each one said that nothing was done right. One of them even started laughing upon seeing the work. When I told my contractor that I would not be paying him, he went off on a rant about how it's easy for one man to judge another man's work when really all it boils down to is preference; just because he did it a different way from how they would have done it doesn't mean it's wrong; and he went on to say that those licensed plumbers just wanted money. When I spoke to the licensed plumbers, they told me that they don't use the SharkBite connectors behind the walls, like the unlicensed plumber was trying to do, and that they generally only use them for temporary applications. The O-ring isn't meant for permanent applications.
The reason I detail that story is to show you that there are a lot of factors that go into estimating a cost of anything in particular. Labor costs rack up faster than the supplies. The size and the complexity also matter. A roof on a small cottage is going to be a lot cheaper than the roof on a two story Victorian. Same with plumbing and electricity.
Once you start asking questions, you start to learn what to look for. When you view a property you want to buy, you'll have a baseline. Well, I know that with this last place, which is largely similar, the plumbing cost X, so that's a starting point. So on and so forth.
You would also do well to read up on J. Scott's The Book on Estimating Rehab Costs.
Sorry for the long rant. Oftentimes I prefer to overexplain rather than give you a quick two lines about learning and reading.