Game graphics
Pixel-art integer scaling and viewport fit calculator
Find the largest whole-number image scale that fits a viewport, with dimensions and centered padding. Enter your own values to compare the results.
Your inputs
Enable JavaScript to calculate.
Worked example
A 320 × 180 pixel source fits exactly into a 1920 × 1080 viewport at 6× scale. In a 1366 × 768 viewport, 4× fits, giving a 1280 × 720 image and centered padding.