We present photometric redshifts for the COSMOS survey derived from a new code , optimized to yield accurate and reliable redshifts and spectral types of galaxies down to faint magnitudes and redshifts out to z \sim 1.2 . The technique uses \chi ^ { 2 } template fitting , combined with luminosity function priors and with the option to estimate the internal extinction ( or E ( B - V ) ) . The median most-probable redshift , best-fit spectral type and reddening , absolute magnitude and stellar mass are derived in addition to the full redshift probability distributions . Using simulations with sampling and noise similar to those in COSMOS , the accuracy and reliability is estimated for the photometric redshifts as a function of the magnitude limits of the sample , S/N ratios and the number of bands used . We find from the simulations that the ratio of derived 95 % confidence interval in the \chi ^ { 2 } probability distribution to the estimated photometric redshift ( D _ { 95 } ) can be used to identify and exclude the catastrophic failures in the photometric redshift estimates . To evaluate the reliability of the photometric redshifts , we compare the derived redshifts with high-reliability spectroscopic redshifts for a sample of 868 normal galaxies with z < 1.2 from z COSMOS . Considering different scenarios , depending on using prior , no prior and/or extinction , we compare the photometric and spectroscopic redshifts for this sample . The rms scatter between the estimated photometric redshifts and known spectroscopic redshifts is \sigma ( \Delta ( z ) ) = 0.031 , where \Delta ( z ) = ( z _ { phot } - z _ { spec } ) / ( 1 + z _ { spec } ) with a small fraction of outliers ( < 2.5 \% ) - ( outliers are defined as objects with \Delta ( z ) > 3 \sigma ( \Delta ( z ) ) where \sigma ( \Delta ( z ) ) is the rms scatter in \Delta ( z ) ) . We also find good agreement ( \sigma ( \Delta ( z ) ) = 0.10 ) between photometric and spectroscopic redshifts for Type II AGNs . We compare results from our photometric redshift procedure with three other independent codes and find them in excellent agreement . We show preliminary results , based on photometric redshifts for the entire COSMOS sample ( to i < 25 mag . ) .