Dealers, demo rides, and even online tools can help you find the perfect fit.
Ergonomics are quite important when it comes to a motorcycle. Unlike a car, it's not only about your comfort, but also your ability to control the bike. Unless you're Jocelin Snow, you're going to want a bike low enough to get on and off easily. You'll also need to handle the controls without overextending or cramping your arms and feet. Here are some ways you can make sure your dream ride is actually the best fit for you.
Sit On It
It seems obvious that the best way to test fit a motorcycle is to actually sit on the bike you're interested in. Any dealer or private seller should let you do this without any hassle at all. An alternative to this is a motorcycle show like IMS, where no one is trying to sell you anything and you can sit on many different makes and models.
Keep in mind, however, that how you fit on a bike at a stop only tells part of the story. You don't ride with the kickstand down and one foot on the ground. Sometimes a sales person will brace the front wheel with their legs and hold the bike up for you, which enables you to get a better idea of how you'll fit with the bike in motion. Even this isn't as good as actually riding the bike, though.
You don't really know a motorcycle until you actually ride it. This goes not just for ergonomics, but also for how the bike actually goes down the road. You might not realize that the handlebars hit your leg, or that the shifter is in just the wrong place to operate comfortably until you actually try to do it.
Unfortunately, test rides are often a controversial topic between a seller and a potential buyer. Many dealers and private sellers won't allow a test ride at all. Some may allow it with cash in hand for the purchase, which they would then keep if you break it. Others have no issue at all with test rides. Believe it or not, Harley-Davidson is one of the best brands for allowing test rides. One day I rolled into a dealer on my Honda Shadow, and they put me on four different Harleys to try out. Many Japanese brands, however, won't let you take a test ride under any circumstances.
One way around this problem is to wait until the dealer holds a demo day. This involves a dedicated fleet of demonstration bikes that the brand hauls from place to place for the express purpose of letting you try them out. That way, the dealer isn't risking their own inventory.
These are usually group rides, led and tailed by representatives of the brand. You will follow a specified route, usually set up to give you a variety of different roads to try, from back roads to highway. There's no place for shenanigans like speed or wheelies on a demo ride, so you won't be able to push the bike too hard. You will get about 20 minutes of experience on at least one chosen model, possibly more depending on the rules of the event. Since we don't have motorcycle press events in New England where I live, I try to get to as many demo rides as possible during the year to experience as many bikes as I can.
Another great tool you can use is Cycle-Ergo.com. While not complete, it has a wide selection of motorcycles in its inventory. You specify your height and inseam, and it will show you exactly how you would fit on that motorcycle. In the world of COVID-19, this can reduce your in-person contact with people and machines by helping you narrow down your choices in the safety of your own home.
In this image, you can clearly see why my legs felt cramped after a couple of hours on my Honda PC800. My upper body is fine, especially with the one-inch handlebar risers (you can program that in, too), but with my 32-inch inseam, my legs had nowhere to stretch out. If I'd known about this tool before buying my PC800, I might have looked elsewhere.
You can compare and contrast different bikes to see how well or poorly you would fit on them. I bought a Honda Shadow ACE 1100 after my PC800, which fit me quite comfortably. When I pulled up a similar model here (the Shadow Spirit 1100 uses the same frame as my ACE, which was not in the database), I was amazed to see that its ergonomics were nearly identical to my PC800 except for the legroom. That was my only issue with the Pacific Coast, and it's easy to see how the Shadow solved that for me.
There are additional settings on the website to show you different situations on each bike. Here, you can see that I can't flat-foot my Kawasaki KLR 650. If flat-footing a bike is important to you, this is an excellent way to verify that you can do it before you even see the bike in person. I can verify from experience that this is exactly how I look when putting both feet down on my KLR.
If you frequently ride with a passenger, you can make sure the bike is comfortable for them, too. I plugged my girlfriend's dimensions into the tool, and I can see how she's surprisingly comfortable on the back of my KLR. A KLR is not known for its two-up capabilities, but now that I can see it, I understand why she feels that way. If your pillion is pickier, you can get a good idea of how they fit before you test fit them in real life.
Also, keep in mind that you can often change a bike's ergonomics to fit your needs. My girlfriend's arms were overextended when she sat on a Triumph Speedmaster at the dealer, but simply rotating the handlebars back a bit would fix that at no extra cost. Accessories like handlebar risers and alternative footpegs can change how you fit as well. Cruisers, in particular, might have forward or mid control options for your feet to put them where you want them. Cycle-Ergo.com lets you adjust handlebar and peg positions, as well as seat height, to help you explore these options.