# Pitch and loudness relation

Using an Oscillator in a program, I noticed that the lower and the higher frequencies are less loud than the middle ones. I suspect there is a relation between pitch and loudness but can it be calculated? e.g. can I amplify the amplitude of the oscillator to keep the loudness level equal to all frequencies?