They are different and you should be using sp and not px. Please see this stackoverflow post
sp
Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted for both the screen density and user's preference.
This tool is handy for converting px to sp or dp: http://pixplicity.com/dp-px-converter/