Calculate pixels (and other units!) in DPs
This tool helps you convert pixels to and from DPs (density independent pixels).
- Enter a value and unit to calculate the dimensions for the various DPI bins (ldpi, mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi).
- Enter either a DP (density independent pixel) value or a PX (pixel) value below.
If you use pixels, you can set the screen density that it currently displays on.
The values are calculated based on:
Take special note of the `nodpi` bin; specifying resources using this qualifier specifically instructs the system to not scale resources, regardless of the current screen’s density. The DP/PX converter above behaves slightly different when selecting this bin, as it treats the specified pixel dimension as DP.
If you want to know exactly how many dips you own phone has, and much, much more, get our app Introspect from the Play Store. Completely free, it shows you all there is to know about your phone and has some useful tools for developers.
Check out Pixplicity Academy. Every few months, we give a two-day workshop on Android. With lunch and dinner included, it gives you the toolkit to form a solid basis for Android development at any level. Our world-class Android guru and CTO at Pixplicity, Paul Lammertsma, teaches the workshop of only 10 people, so you will get a ton of personal attention.
We’re happy to help you arrange a trip to the Netherlands; check the Academy page for up-to-date information about upcoming workshops.
Sign up for a two-day Pixplicity Academy course.
We offer workshops for any level Android developer in a lovely hotel in the Netherlands, with lunch and dinner included.
Latest Videos & Posts
Making Your Watch Face Wear 2.0 ready
- Updated 18/5/2017 for the new Gradle 4.0 plugin capabilities! Android Wear 2.0 is right around the corner. The...
Google Allo works with SMS and even when not installed
- Google’s new messaging app Allo takes a unique and interesting approach to get new users on board: it...
A modern Hungarian notation
- Some discussion has recently popped up on the internet about the use of Hungarian notation. Many software engineers...
Debugging Android devices on Linux
- Often working with custom-built Android hardware, we’ve found that it can sometimes be tricky to enable debugging on...