I can understand how the percentage of dark matter compared to ordinary matter is calculated, because the amount of dark matter has a clear gravitational effect on the ordinary matter in a Galaxy.
However, calculating the percentage of dark energy in the universe seems less obvious. Is it something to do with the rate of expansion of space-time?
Please explain in lay-mans terms, I've never learnt any undergraduate level cosmology.