Estimating Total Costs Attached to
According to Adam B. Siegel at Northrup Grumman's Analysis Center in 2008 (400~ kb PDF), each sailor removed from a US Navy warship represents approximately $150,000 in lowered costs each year.
The average pay rate of a US Navy "sailor" on a typical warship in 2008 according to the 2008 DoD pay scales (320~ kb PDF) available from the Defense Finance and Accounting Service was approximately:
Average Officer: $5,184.73 a month, $62,216.86 a year.
(O-1 to O-5 only; O-6 and above excluded for averaging purposes.)
Average Enlisted: $2,280.06 a month, $27,360.72 a year.
(E-1 through E-6 only; E-7 and above excluded for averaging purposes.)
Based on the above average costs and the the manning levels of a Flight II Arleigh Burke destroyer (23 O / 300 EM), the typical large US Surface Combatant has an average per billet basic pay of $29,842 a year.
Rounding this up to $30,000 a year, you can then develop a rough rule of thumb that the total cost (direct/indirect) of a billet is about five times the direct basic pay of that billet for a highly industrialized nation such as the United States.
For example, an O-10 (4 star General Officer) makes on average $187,827.10 a year in direct pay; which means that the total cost of that billet (including direct pay) would be about $939,000~ a year; which is plausible, as flag-rank officers have a lot of extras assigned to them, such as permanently assigned drivers/assistants and security details; which come with their own costs; along with a much better retirement package than the average sailor -- approximately $12,281 a month of retirement pay before taxes for an O-10 with 30 years of service retiring in 2015. (LINK to DoD's Retirement Pay Calculator)
Naturally, the total cost multiplier will be different for each nation – Uganda gets by on a much lower total cost multiplier than the United States – and advanced technologies, such as cheap general purpose AI robotics could significantly alter the costs of providing health care or schooling to military dependents in the far/near future.