In my experience, there are some consistent "buckets" used for smallest-width values. These are
- default: used for everything
sw360dp
: excludes the smallest phones (sometimes 320 or even 240 dp wide)
sw411dp
: differentiates wider-screen flagship phones from narrower-screen ones
sw533dp
: slightly undersized tablets (think the original Kindle Fire)
sw600dp
: standard seven-inch tablets
sw720dp
: standard ten-inch tablets
There's no hard line. It's quite possible for one phone to have a smallest width of 399dp and another to have 401dp; you just have to make a judgement call.
I'd recommend thinking about it not from the perspective of "how can I differentiate these two devices?" but instead from the perspective of "at what point do I have enough room to change my layout?" Maybe once you have at least 400dp to work with, you can change your layout to include more features. Or maybe you need 517dp to get that extra content in. When you think about it this way, then whatever bucket any given device happens to fall inside, it will have a layout that looks like it was designed for that screen size.
There are also some online resources that provide specs for a large number of devices; perhaps you can use these to determine where you want to draw the line. For example: https://material.io/tools/devices/