Mechanosensitive Piezo channels convert mechanical stimuli into biological signals in vertebrates. Piezo1 chemical modulators are anticipated to yield many clinical benefits. To date, Yoda1 is the most potent and widely used Piezo1-selective agonist, yet how Yoda1 interacts with Piezo1 at the protein-membrane interface and stabilizes Piezo1’s open state remains elusive. Here, using a previously identified putative Yoda1 binding site and three molecular dynamics (MD)-based methods, we computed the binding free energies of Yoda1 and its analogs in a Piezo1 cryo-EM closed state and an in silico open state. Our computed absolute binding free energy of Yoda1 in the closed state agrees well with the experimental Kd in which Piezo1 is expected to be in a closed state. More importantly, Yoda1 binds the open state better than the closed state, in agreement with its agonist effects. All three methods predicted that Dooku1, a Yoda1 analog, binds the closed state stronger than Yoda1, but binds the open state weaker than Yoda1. These results are consistent with the fact that Dooku1 antagonizes the effects of Yoda1 but lacks the ability to activate Piezo1. The relative binding free energies of seven Yoda1 analogs recapitulate key experimental structure-activity-relationships (SAR). Based on the state-dependent binding free energies, we were able to predict whether a molecule is an agonist or inhibitor and whether a chemical modification will lead to a change in affinity or efficacy. These mechanistic insights and computational workflow designed for transmembrane binders open an avenue to structural-based screening and design of novel Piezo1 agonists and inhibitors.