Edinburgh is about 24 times smaller than Shanghai.

Shanghai is approximately 6,341 sq km, while Edinburgh (map shows its 30 named neighbourhoods; the area covers the whole city) is approximately 259 sq km, making Edinburgh 4.08% the size of Shanghai.
Tip: This to-scale comparison of Shanghai vs. Edinburgh uses the Mercator projection, which distorts the size of regions near the poles.
Our free app, MapSize by MyLifeElsewhere — compare any two places, to scale on your mobile device.