Windows help establish a home's visual character. They frame views from inside the home and allow for ventilation. Installing a window is easy, but as they say, the devil is in the details. A poor installation can allow water to enter the building, which will have dire — and costly — consequences. Follow the manufacturer’s installation instructions and consider these five tips for a great-looking window:

Make sure it fits. Measure the width of the rough opening at more than one point, including the top and bottom edges, as well as in the middle. Likewise, measure the height along both sides and in the middle of the opening. You want to make sure there are no hips or bellies, meaning the width at top, middle and bottom of the opening should be equal. The same is true for the height along each side and the middle.
Make it square and tight. Use shims to level and fit the window as needed. They are easy to use and very inexpensive. Use a level that’s at least 2 feet long. Anything smaller will give you problems.
Keep water out. Seal the perimeter of the opening with sticky sheets of self-adhering waterproof membrane, strips of metal flashing and generous amounts of caulk. Even if some rain gets through one of these layers, it will be stopped by the next. When applying flashing, layer the material so that any water running down the wall is directed out: Seams should never face up.
Fasten correctly. If the house is in a coastal area, use galvanized or stainless steel fasteners. Anything else will corrode with time.
Plug all the gaps. Once the opening is watertight and the window is set plumb and square, plug the gap between the window and the framing with foam insulation. Do not fill the gap between the jamb and framing with too much foam too quickly. If you do, the jamb could bow and thereby bind the sash.