A refrigerator and a method of controlling the same are disclosed. The refrigerator and the method of controlling the same detect smell intensity generated from a foodstuff and control a deodorizing function according to the smell intensity in order to remove unpleasant smell in the refrigerator during containing the foodstuff, and rapidly remove smell even when a foodstuff is newly input to generate smell so as to reduce user displeasure and to prevent the smell from affecting other foodstuffs, thereby enhancing convenience.