The first thing you need to buy prescription glasses online is a prescription. The best way to get an accurate prescription is to visit an optometrist and have an eye exam, which tends to cost around $100. After the test is complete, you need to make sure you get a hard copy of your prescription so you can retain it for your records. Alternatively, you can pick up a device like the $99 EyeQue Vision Check to use your smartphone to check your vision and create a prescription that many online glasses stores will accept, though some do require an Rx from an optometrist.
Get your pupillary distance number from your optometrist or measure it yourself. Be aware that sometimes optometrists won't give your pupillary distance because they'll say they want to measure you for a specific set of glasses. But insist on getting one because it's required to order glasses online. Note that you can also measure PD yourself using an app on your smartphone or download a PD ruler that most online stores have available for download with instructions on how to use it. Pupillary distance is key, because when lenses are made it's important to know where your eye is in relation to the center of the lens.
Make sure your prescription isn't out of date. If you haven't had a vision test in a while, it might be a good idea to get another one. Some sites like Warby Parker offer an inexpensive virtual vision test if your prescription is out of date but you feel you're seeing well out of your current glasses (but still want to replace them). You take a five-minute vision test, looking at an eye chart from home. An eye doctor then reviews the results and responds within 48 hours to let you know if you've qualified for a prescription renewal.
Some but not all stores accept dollars from Flexible Spending and Health Savings Accounts. If you have money you want to use from an FSA or HSA, or have vision insurance, you need to check on the store's insurance, FSA and HSA policies before making a purchase. Many do accept them.
Go to an online retailer and select a pair of frames that you like. This can be the hardest part of the process, because it's tricky to know exactly what you'll look like in the glasses unless you try the frames on in person and look at yourself in a mirror. Some online retailers have virtual try-on applications or, even better, they'll ship you a few frames to try on at home before you select one of more to buy.
Provide your prescription. With some online retailers, you can simply take a picture of your prescription with your smartphone and upload the image to the site. And most prescription glasses sites also allow you to manually input your prescription numbers, which is typically what I do. When a site asks for your prescription, it will also ask for your PD number.
Select the type of lenses you want. You can buy complete basic single-vision prescription glasses for less than $20 online. And in most cases, they'll work fine. But you will certainly notice a difference when upgrading to higher quality lenses in terms of clarity and weight (thinner, lighter lenses tend to cost more). I personally have a few cheap sets of prescription glasses that I keep in my car or in a backpack as backup glasses in case something should happen to my main pair. However, what I've found is that often the best thing to do is spend a little more for a higher-grade lens and not go for the cheapest option.
Before making your final purchase, read the fine print on the site's return policy. Many sites are good about letting you return glasses if the lenses you ordered (based on your correct prescription numbers) aren't good for some reason or the frames just don't fit right. But read the fine print on the return policy. In some cases you can get a full refund and in others a store credit. However, sometimes stores will only offer a partial store credit. You don't want to be surprised if something goes wrong. I've only had one company screw up my order with a wrong prescription in one lens.
Input any discount codes at checkout. Glasses sites constantly have promos running with discount codes that you input at checkout, though they sometimes exclude premium frames from name-brand companies. And sometimes you'll see slightly sweeter deals around a holiday, with online glasses stores using almost any holiday as an excuse to offer a new discount code.