How do people calculate proportions of dark matter, dark energy and baryonic matter of the universe? The Wikipedia page on dark matter mentions that the Planck mission had revealed that in our universe ordinary baryonic matter, dark matter and dark energy are present in the ratio: 4.9%, 26.8% and 68.3% respectively. I do not understand exactly how this result had been got. Did the Planck mission scan the entire universe as it is today to get these figures or just a part of the universe? (Is it really possible to scan the entire universe if the universe is infinitely large?) Can anybody please explain the principle behind the calculation?
I also notice that the above figures are given in terms of percentages. Can I get the absolute values of the individual quantities like, total dark energy = .... Joule in the universe?
In case only a part had been scanned then is it possible that in future these figures may change if a larger portion of the universe is scanned by another mission?
 A: There are three main techniques for measuring the cosmological parameters $\Omega_\Lambda$ (density of dark energy) and $\Omega_M$ (density of matter): redshifts of supernovae, CMB measurements, and measurements of baryon acoustic oscillations (BAO). Each of these is individually sufficient to rule out a cosmology without any dark energy ($\Omega_\Lambda=0$). Combining all three of them gives a consistency check and also results in a better determination of $\Omega_\Lambda$ and $\Omega_M$ than could be obtained from one of them alone. The BAO technique is most sensitive to $\Omega_M$, supernovae to $\Omega_\Lambda-\Omega_M$, and CMB to $\Omega_\Lambda+\Omega_M$. The figure below shows the cosmological parameters of our universe, after Perlmutter 1998 and Kowalski 2008. The three shaded regions represent the 95% confidence regions for the three types of observations.

The density of matter $\Omega_M$ can be broken down into baryonic and nonbaryonic matter (dark matter). There are several ways we can do this (Roos 2012):
(1) We have models of nucleosynthesis during the era shortly after the Big Bang (before the formation of the first stars). The observed relative abundances of hydrogen, helium, and deuterium cannot be reconciled with the density of nonrelativistic matter inferred from the observational data. If the inferred mass density were entirely due to  baryonic matter, then nuclear reactions in the dense early universe should have proceeded relatively efficiently, leading to a much higher ratio of helium to hydrogen, and a much lower abundance of deuterium.
(2) The existence of nonbaryonic matter is also required in order to reconcile the observed density of galaxies with the observed strength of the CMB fluctuations.
(3) In merging galaxy clusters it has been observed that the gravitational potential is offset from the radiating plasma.
Kowalski 2008, http://arxiv.org/abs/0804.4142
Perlmutter, 1998, http://arxiv.org/abs/astro-ph/9812133
Roos, 2012, http://arxiv.org/abs/1208.3662
A: It's not clear if you're asking for details of how the CMB power spectrum is analysed, or whether it's a general question about how this sort of measurement is made. I'll assume the latter - hopefully this will be of interest to others even if it isn't what you intended.
There is a good discussion of the procedure in the Wikipedia article on the Lambda-CDM model, which you'll often hear described as concordance cosmology.
It's very common in Physics that you can't directly measure a quantity. Instead you construct a mathematical model to describe your experimental results, in which the quantity you're trying to determine is an adjustable parameter. Then you pass your results to a big computer that adjusts the parameter to get the best fit to experiment. The result is your measurement, but it's an indirect measurement. Pretty much everything measured by the LHC is actually a best fit obtained from a mathematical model.
This is how the proportion of baryonic matter etc are determined. A minimal description of the universe requires six parameters:


*

*physical baryon density

*physical dark matter density

*dark energy density

*scalar spectral index

*curvature fluctuation amplitude

*reionization optical depth


(No, I don't know what the last three of these are either, but as always Wikipedia is your friend.)
Planck didn't measure the CMB in the entire universe, however it did measure the CMB as it looks from Earth in all directions. We assume the universe is homogenous and isotropic, so the results measured from Earth should be basically the same as those measured anywhere else in the universe.
Anyhow, a mathetical model is constructed to describe the CMB using these six parameters, then a computer adjusts the values to get the best fit. The result is calculated values for the baryonic matter fraction etc. As dmckee mentioned, a similar fit can be done for other measurements like the baryon acoustic oscillation, and reassuringly the results are in line with the CMB fit.
The values can and do change as more data becomes available. Before Planck the calculation was done using the WMAP data, and the (much more accurate) Planck measurements revised the values determined from the WMAP data. Future measurements may cause further revision, however this is likely to be just increasing accuracy rather than a wholesale overturning of our current models.
A: The amount of dark matter can be calculated by gravitational lensing. At the cosmic scale, when there is a source large source of light L such as light from a galaxy which is located behind a body of large mass (visible + invisible matter) M, the mass of M acts  as a lens and bends the light from L. Therefore when we observe this system, we will observe multiple images of L around M. Because we understand general relativity, we can work backwards and calculate how much mass should be there in the system in order to produce that image. This will give the total mass of the system and if you subtract the visible mass, you get the amount of dark matter in that system. What we observed that more of less the proportion of visible and dark matter remained roughly equal 25-30% across multiple observations hence you have the the amount of dark matter given in % which is fairly constant across observations though the mass of the galaxies involved in each observation could vary. Extrapolating this fact we say that about 30% of the universe is dark matter.
For dark energy, once you estimate the total visible matter + dark matter, first we calculate the total known energy of the universe that comes from all visible matter + all radiation + everything else that can be accounted for. Then we look at the rate of expansion of the universe and calculate how much energy is required to make the universe accelerate at the observed rate. We find that this required energy is much more than the energy accounted for form visible and dark matter. The difference between the known and the required energy is equal to the dark energy. 
