There isn't a foolproof way to go from an item to its ilvl. It is, of course, possible to infer the lowest possible ilvl from its modifiers. An amulet with +2 class skills must be 90-99, and a grand charm with +45 life must be 91-99. In a less helpful case, 10% FCR ring is 5-99. You can consult the Arreat Summit's pages for this information.
If you know the history of an item (which is to say, if you were there when the item was found), then you can also have a better guess or even know for sure. If a monster dropped it, most of the time it is equal to the alvl of the area, but there are exceptions and, of course, some items are cubed or bought from merchants.
This post was edited by apliddell on Aug 21 2017 02:45pm