How to calculate air tank capacity from tank displacement, tank fill (gauge) pressure, and specific type of gas?
"Quick and Dirty" for gases other than carbon dioxide

You're trying to figure out what volume of gas as STP (standard temperature and pressure) would fill a 122 cc tank at 3000 psi. From ideal gas laws:

$PV = nRT$

but since nRT is constant

$P_1V_1 = P_2V_2$

so 

$V_{14.7psi} = \dfrac{(3000\text{ psi})V_{3000psi}}{14.7\text{ psi}} = 204 \times V_{3000psi}$

It takes one tank of gas to fill the "empty" tank, so 203 more tanks of gas can be pumped into the tank full of gas at 14.7 psi to get to $3000 \text{ psi}$. 

$ 203 \times 122 \text{ cubic centimeters} = 24.7 \text{ liters}$

1 liter is 0.0353147 cubic feet. So:

$24.7 * 0.0353147 = 0.87$ cubic feet of whatever gas.

I lifted the following figure from this webpage. In basically shows that for a given temperature and amount of gas (number of moles) then the product of pressure and volume, PV, ought to be a constant which isn't observed with "real" gases. The lines show the real behavior and the data points estimates from the Van der Waals equations. The gist here that for most normal gases at 3000 psi (200 atmospheres), you'll only be off by about 20%.



More exact solution using Van der Waals equation for gases other than carbon dioxide

Starting from the Van der Waals equation


  
    $(P + \dfrac{an^2}{V^2})(V - nb) = nRT$
  


Where:


P - pressure
V - volume
n - number of moles
T - absolute temperature
R - ideal gas constant = 0.08206    L atm/(K mol)
a - constant
b - constant


T must be an absolute temperature. Typically in science the Kelvin scale is used. 

P is conveniently converted to atmospheres where 1 atmosphere = 14 psi.  

a,b are looked up in tables of gas constants

In the following table the constant $a$ has units $L^2 \cdot \text{atm} \cdot mole^{-2}$ (assuming 1 bar = 0.987 atm )and $b$ has units $L \cdot mole^{-1}$

   Gas                a             b
   Nitrogen          1.352          0.0387
   Helium            0.0342         0.0238
   Dry Air(a)        1.33           0.0366
   Carbon dioxide    3.593          0.04267


(a) reference 

Steps:

(1) To calculate the number of moles of gas at high pressure, you solve the following cubic equation for $n$. (Knowing $P, V, T, a,$ and $b$). At high pressure (hundreds of atmospheres), and well above the critical temperature there will only be one root for $n$ for all the gases listed except carbon dioxide. 


  
    $(\dfrac{ab}{V^2})n^3 - (\dfrac{a}{v})n^2 + (Pb+RT)n -PV = 0 $
  


(2) To calculate the volume of gas at room temperature and pressure, you solve the following cubic equation for volume, V, using $n$ from step 1. (Knowing $P, n, T, a$, and $b$). At room temperatures and pressure there will only be one root for $V$ for all gases including carbon dioxide. 


  
    $(P)V^3 -(nbP+nRT)V^2 +(an^2)V -abn^3 = 0$
  


Solution for carbon dioxide

At room temperature and pressure gaseous carbon dioxide gas would follow Van der Waals equation as noted in step 2 above. However with "moderate" pressure carbon dioxide liquefies at room temperature. Thus a carbon dioxide tank is filled to about 85% of its volume capacity with liquid carbon dioxide. 

The overall idea is that the liquid carbon dioxide expands to a gas in an airgun. This creates a relatively stable pressure as the airgun is shot. (You do have to allow the carbon dioxide reservoir to warm back to ambient temperature since vaporizing the liquid to a gas cools the reservoir.)

There are two other considerations here. First above the critical point 304.18 K (31.03 °C, 89 °F) and 72.8 atmospheres, carbon dioxide exists as a supercritical fluid. Second a carbon dioxide tank is never filled completely full of liquid. There is always some gas headspace, hence the 85% fill. Carbon dioxide tanks have been documented to explode in a hot car on a summer day for example. 




  
    (Image from Wikipedia)