How to calculate
Reduce width to height by dividing both dimensions by their greatest common divisor. Divide the requested dimension by its original to get the scale, or divide a scale percentage by 100. Apply that scale to both axes and round for whole pixels.
Worked example
Use Original width in pixels 1920 · Original height in pixels 1080 · Resize to Target width · New image width in pixels 1280. The result is 1280 × 720 px.
Input and result notes
A 50% scale halves each dimension and leaves about one quarter as many pixels. Copy the new dimensions into your editor.