We present precise tests of CP and CPT symmetry based on the full dataset of K to pipi decays collected by the KTeV experiment at Fermi National Accelerator Laboratory during 1996, 1997, and 1999. This dataset contains 16 million K to 2pi0 and 69 million K to pi+pi- decays. We measure the direct CP violation parameter Re(epsilon'/epsilon) = (19.2 pm 2.1)x10-4. We find the KL-KS mass difference Deltam = (5270 pm 12)x10^6 hbar/s and the KS lifetime tauS = (89.62 pm 0.05)x10-12 s. We also measure several parameters that test CPT invariance. We find the difference between the phase of the indirect CP violation parameter, epsilon, and the superweak phase, phi_epsilon - phi_SW = (0.40 pm 0.56) degrees. We measure the difference of the relative phases between the CP violating and CP conserving decay amplitudes for K to pi+pi- (phi+-) and for K to 2pi0 (phi00), Delta phi = (0.30 pm 0.35) degrees. From these phase measurements, we place a limit on the mass difference between K0 and K0bar, DeltaM < 4.8 x 10-19 GeV/c^2 at 95% C.L. These results are consistent with those of other experiments, our own earlier measurements, and CPT symmetry.