Measure inside width of old window frame. Measure from jamb to jamb. The jamb is the slightly recessed strip of wood right next to the part you raise to open your window. Take three measurements: one at the top of the window, one at the middle and one at the bottom. Use the smallest of these three measurements.
Measure the inside height of old window frame. Measure from the top of the window sill to bottom of the top jamb. Again, measure in three places: at the far left-hand side of the window, in the center and at the far right-hand side. Use the smallest of these three measurements.
Check to see if the window frame is square. Measure the window diagonally from corner to corner, jamb to jamb. These two measurements should be the same or within 1/4 inch of each other. If it is larger than that, a replacement insert will not work and you'll need to install an entire full-frame replacement window.