A fence can be a real budget buster if you do not plan ahead. There are many different considerations that will affect the project cost but labor and material cost are the most important.
Labor is all about whether you will do the work yourself or you hire a professional. The upside of doing it yourself is that you will only have to pay for materials. It is labor intensive work and since you do not do it as often as a pro, it will be slow going. You will have to decide how much your time is worth. A professional will also have any special tools that they may need on hand, while you would have to go out and purchase or rent one. Also, a fence built by a professional will last much longer so you get a better bang for your buck.
Material is based on what you intend to build your fence out of. Chain link is probably the most cost effective choice but you may want a solid wood fence and that can get expensive. You will need to know exactly how large the fence will be, in order to see how much lumber you will need. Then if you need to save some money, you can use treated pine for an economical option. If you have the money to go higher end with your material, then you could have your fence built out of cedar wood. It is a strong wood and most people seal the wood against the elements in a way that keeps its natural beauty.