If you spend 400 credits for a shield upgrade that increases shields by %5, then you are effectively buying %5 more ships than what you already have built. This means that if you buy cheap 600 credit light frigates early game, you need 14 light frigates to make a 5% buff worth it. 1) 600 credits * .05% = 30 credits 2) 30 credits * 14 = 420 credits
Hence, you gain 20 credits for your research.
Make sure you build at least 20 ships before you start to upgrade them. Do not waste early money on upgrades when you could buy more ships instead to increase the potency of a future upgrade.