In theory, the PSU you choose should be able to deliver more than the sum of the maximum consumption of every component.
If you want your PSU to live longer, it should even be two or three time that sum.
You should be able to find the power needed by components in their data-sheets (This is easy for CPU or graphic card, but that is not true for some other components).
It's in fact quite difficult to really know precisely before testing the hardware, because not every component vendors gives details about the power needed for their component.
The best way to know without error would be to measure the actual consumption of the running hardware, and multiply this by a factor of 2 or 3.
1
Also: http://superuser.com/questions/167115/how-can-i-check-if-my-system-needs-more-psu-power, http://superuser.com/questions/567294/what-power-supply-unit-psu-is-needed-for-16gb-ram-and-graphic-card-upgrade?noredirect=1&lq=1, http://superuser.com/questions/273365/dimensioning-a-new-psu-correctly?noredirect=1&lq=1, http://superuser.com/questions/287273/which-power-supply-do-i-need-to-support-my-system?rq=1, etc.
– Ƭᴇcʜιᴇ007 – 2017-01-13T15:15:51.133bear in mind that a 400watt rated supply is for delivering 400watts at a certain efficiency. A 50% efficient supply at 100% load would deliver 400w, but will be pulling 800w from the wall. This means a higher electric bill than an 80% efficient. Many of the better supplies look for 80% efficiency, but the efficiency is not linear across the load%. – Yorik – 2017-01-13T15:16:24.430