If you just need a new windowpane, contact a glazing contractor to come and replace the pane. If the whole window must be replaced, consider using a stock replacement window. You may have to make some adjustments to the frame, but it will cost less than a custom window. Using a crowbar, remove the entire window casing, including the trim and sill plate.
After removing the window casing make sure the headers and studs are plum and square, and the frame matches the dimension of the new window. This may require adding new boards to the frame (we used 2 x 4s), as well as removing part of the siding on the exterior. Allow about 1/4 inch gap on all sides for further adjustments and insulation.
If a section of the exterior siding had to be removed, be sure to put felt wrap back up to keep moisture out. Then apply window wrap to the exterior framing of the window. Start the window wrap installation at the bottom of the window and work your way up.
Install the window from the exterior by pushing the window up until it is flush to the frame. Screw your window into place; make sure you are able to anchor it to a solid piece of wood. Adjust the window until it is plumb and square by maneuvering the screws and adding shims to areas that need adjustment. Once the window is in the correct position, from the exterior, use screws or nails to secure it into place.
Once your window is plumb, square and nailed into place, add another layer of window wrap around the fins of the window. Make sure you overlap the wrap and completely cover the surfaces. Do not let the wrap crinkle or fold back on itself. It is a key component to keeping moisture out, so it must remain straight and flush to the window frame.
Insulate the window by putting expanding-foam sealant in the gap between the casing and the window. Cover the edges of the window with painter’s tape to protect the surface. Once the foam dries it has to be scraped off with a knife. Don’t add too much foam because it will bow the window and disable it from working.
After the foam dries, cut away the excess and install a new interior casing. Replace exterior trim if needed.