An answer can certainly be calculated, but it requires the use of numbers from both canon and Legends, as not all statistics found in Legends material have an equivalent figure accounted for in Disney canon.
First, the figures (canon unless stated otherwise):
All figures are based on the value of the Imperial credit in 0 BBY. Skip to the bottom for the final math.
Some historical background on each of the above to set the context for comparison:
- The DS-I is the first of its kind. Start-up costs are high as most of the DS-I's budget goes heavily into R&D of completely new technology and infrastructure set-up. These are sunk costs.
- The DS-II, though much bigger and contains more technical features than the DS-I, is ultimately just an upgrade of what already exists. Much of what is already developed for the construction of the DS-I, paid for in the sunk costs, can be reused, so that component need not be paid for again beyond maintenance costs. However, this "savings" is countered by a major scaling up of the DS-II compared to the DS-I: Larger battlestation, more surface defences, more advanced superlaser, more hangars and on-board TIE squadrons etc. all of which costs more money. This is probably why the DS-I and DS-II may have similar costs.
- The Imperial I-Class Star Destroyer was developed to replace the Venator-Class Star Destroyer and would become the symbol of the Imperial Navy. At the height of the Empire (presumed 0 BBY), there are over 25,000 ISDs in the galaxy.
- The Imperial II-Class Star Destroyer is an upgrade to the Imperial I-Class and the first completed ships entered service in 0 BBY. They are present at both the Battle of Hoth and the Battle of Endor.
In business, the one-off sunk costs into inventing the product and setting up the production line doesn't factor into the price tag - the long-term fixed and variable costs, and the desired profit margin determines the price tag, and the amount of profits earned determines the breakeven point when the initial investment is fully repaid.
As such, I will answer your question using the following interpretation: What is the opportunity cost of building the Death Star II compared to building more Imperial II-Class Star Destroyers? In 0 ABY, Emperor Palpatine would have to choose between building the DS-II to replace the DS-I, or expand the Imperial Navy even further with the same amount of funds instead. The sunk costs for both are largely paid for already, so the only expenditure is into actual production of the next order. These are the numbers that would be presented to him:
Assuming the DS-II costs exactly 1 trillion credits, then given that the Imperial II-Class Star Destroyer costs 145,670,000 credits, the DS-II would be the financial equivalent of 6,864.83 Imperial Star Destroyers. Assuming the current fleet has 25,000 ISDs, the opportunity cost of building the Death Star II would be expanding the Imperial fleet by a further 27.46%.
Disclaimer: This estimate assumes the DS-II at the cheapest possible price, and the entire Imperial starfleet as composing of only ISDs. The actual price of the DS-II would raise the estimate, but including the rest of the Imperial Starfleet (any assault ship not ISD: Acclamators and Venators still in service, Victory-Class, Interdictors, Super Star Destroyers, non-Star Destroyers etc.) will lower the estimate.