Integer Scaling Calculator — Pixel-Perfect Scale for Retro Games
Enter a source (game) resolution and target (display) resolution to find the largest whole-number scale factor that fits. The calculator shows the scaled resolution, horizontal and vertical border sizes, and screen utilization percentage. This is not a GPU scaling compatibility check, does not handle aspect ratio correction (PAR/DAR), and assumes square pixels.
Resolutions
Formulas
scale_factor = floor(min(dst_width / src_width, dst_height / src_height))
scaled_width = src_width × scale_factor
scaled_height = src_height × scale_factor
border_horizontal = floor((dst_width - scaled_width) / 2)
border_vertical = floor((dst_height - scaled_height) / 2)
utilization = (scaled_width × scaled_height) / (dst_width × dst_height) × 100
Where src_width = source (game) width in pixels; src_height = source (game) height in pixels; dst_width = target (display) width in pixels; dst_height = target (display) height in pixels; scale_factor = largest whole-number scale factor; scaled_width = source width multiplied by scale factor; scaled_height = source height multiplied by scale factor; border_horizontal = left and right border in pixels (each side); border_vertical = top and bottom border in pixels (each side); utilization = percentage of display area used by scaled image.
Integer scaling uses the same whole-number factor on both axes to preserve square pixels.
The scale factor is limited by the more constrained dimension (width or height).
Borders are centered; any odd pixel difference goes to right/bottom.
Does not apply aspect ratio correction; use the pixel aspect ratio calculator for non-square pixel sources.
Checked examples
320x240 source on 1920x1080 display: max scale = min(1920/320=6, 1080/240=4.5) = 4. Scaled: 1280x960. Borders: (1920-1280)/2=320 L/R, (1080-960)/2=60 T/B. Utilization: (1280*960)/(1920*1080)*100 = 59.3%.
256x224 (NES/SNES) on 1920x1080: max scale = min(1920/256=7.5, 1080/224=4.82) = 4. Scaled: 1024x896. Borders: 448 L/R, 92 T/B. Utilization: 44.25%.
240x160 (GBA) on 1920x1080: max scale = min(1920/240=8, 1080/160=6.75) = 6. Scaled: 1440x960. Borders: 240 L/R, 60 T/B. Utilization: 66.7%.
Limits
Source and display dimensions must be positive integers. Assumes square pixels; does not handle pixel aspect ratio correction. If scale factor is 0, the source does not fit even at 1x. Not for: GPU integer scaling hardware support detection; Pixel aspect ratio (PAR) or display aspect ratio (DAR) correction; Non-square pixel sources (e.g., SNES 8:7 PAR, CRT geometry); Fractional scaling with sharpening (sharp-bilinear).
FixGamerHub Integer Scaling Calculator and AspectRatioZ Integer Scaling Calculator.