If you want to spreadsheet it or graph it, you'll get a largely meaningless answer. Even for more classical RTS mechanics that's an oversimplification. If you're just crunching numbers, then we can simply see how much a new frigate will add to the fleet's overall damage and health. If we have 10 frigates currently, adding one more increases overall damage and health by 10%, clearly a better investment than upgrades. There are many factors that make this inaccurate.
For one thing, consider this simple scenario: 10 units that deal 20 damage each and have 400 hit points, or 20 units that deal 10 damage each and have 200 hit points. Clearly total damage and hit points are equal. However, consider what happens after one volley of focus fire. The group of stronger but fewer units has made their first kill, but the group of weaker units has only damaged one of the bigger units, not killed it outright. Because the weaker units have lost some of their firepower, it will take two more volleys to make the first kill, and their damage output isadvantage will only snowball as the battle progresses. In other words, fewer stronger units actually are better than many weaker units, even if the total health and damage output of both groups is equal.
More recent generations of RTS games have more complicated features that also make the consideration less of a linear cost-benefit analysis. A fully upgraded frigate and a completely unupgraded frigate both give the same amount of experience to a capital ship. Clearly upgrading a unit will make the enemy have to work harder for each point of experience. A smaller upgraded fleet may be weaker, but in the long-run their capital ships will be stronger because of it. Another very obvious issue is upkeep; often times you simply cannot afford to acquire another fleet upgrade. Generic damage and health upgrades give you an alternative to buff up your fleet without having to make that huge commitment to fleet upgrades.
There's even more to consider; special abilities from friendly capital ships and support cruisers may be enhanced by upgrades, while enemy abilities may be mitigated. If you don't have health upgrades, you're just giving abilities like nano-disassemblers and flak barrage free reign. On the other hand, every point of armour makes your hit points go farther, making Hoshiko healing (or any healing, for that matter) more effective. Then you have upgrades like Vasari phase missiles which don't even fit in to traditional damage analysis because their effect is very situational. Fairly useless if the enemy's shields are already down, but wickedly powerful if they're relying on Dunovs or Progens for healing.
I don't think there's an easy way to model this mathematically, and certainly doing a spreadsheet is rather pointless. Sure, you can find where technically you get more damage by investing in an upgrade than you would from a new frigate, but how much does that tell you about what's going to happen in battle?