While 1/f noise is ubiquitous and has been found in various systems, its physics remains uncertain. From an analytical study of an ordinary diffusion equation, we find an additional example of the 1/f noise. The formula for this example, together with existing knowledge about scaling in fluid turbulence, implies a necessary and sufficient condition for the occurrence of any stationary 1/f noise. That is, the noise needs to be characterized by two constant frequencies of flow≪fhigh. For a frequency range from f=flow to fhigh, it is further needed that, except for the mean amplitude of the noise, there is no other constant parameter. Then, at flow≪f≪fhigh, the noise scales asymptotically as 1/f. Being statistical and simple, our condition applies to any system and hence explains the ubiquity of the 1/f noise. It is also applicable to some systems with noise of I^±=1.0 for 1/fI^±, via intermittency analogous to that of the turbulence.