Port upgrades are a set $ amount per sailing and are from a category to a category and it doesn't matter how many people are sailing in the cabin, the price is the same to upgrade for 2 people as for 5 people (as long as the cabin holds that many people).
To know if it's a good deal or not is to price out that cabin you would want to upgrade to and compare that to what you have booked and then if there are upgrades available at the port you will know what the difference would have been prior to arriving at the port. But it is usually much, much cheaper to upgrade at the port, if available.