Take measurements horizontally at the top, middle and bottom of the window or door reveal and take the smallest dimension.
Similarly take the left, centre and right hand vertical measurements and take the smallest dimension.
Check that the window/door sides and top are vertical and horizontal respectively. If they are not, take account of this when submitting the final measurement.
Always use a steel tape measure rather than a fabric one (they tend to stretch).