That's right. When you're diluting, boiling, etc. It's easy to use 'gravity points'. Just take the number after the decimal point in your gravity and multiply it by the gallons. In your case 3*100=300 grav. points. To get your final gravity, take your gravity points and divide by the finished volume 300/5=60.
Works the same way for estimating OG from pre-boil volume. If you collect 8 gallons of wort at 1.040, you have 8*40=320 gravity points in your kettle. The OG of your batch will be 320 divided by whatever your post boil volume is. If you boil down to 6 gallons, your OG is 320/6=53, or 1.053.