You do not need a fully stocked bar to make excellent cocktails. Most classic recipes use the same handful of spirits, citrus, and sweeteners in different combinations. Understanding a few principles lets you work confidently with whatever is in your cabinet.
Nearly every classic cocktail follows one of a few simple templates. The sour template is spirit + citrus + sweetener: a Daiquiri is rum, lime, simple syrup; a Whiskey Sour is bourbon, lemon, simple syrup; a Margarita is tequila, lime, triple sec. Once you see the pattern, you realize that knowing one recipe teaches you the structure of dozens. The old fashioned template is spirit + sugar + bitters: an Old Fashioned is bourbon, sugar, Angostura bitters; a Sazerac is rye, sugar, bitters. The highball template is spirit + mixer: a Gin and Tonic, a Screwdriver, a Cuba Libre. The pattern matters more than memorizing individual recipes, because once you understand it, you can look at your shelf and see possibilities instead of limitations.
If you are starting from nothing, buy five things: a bottle of bourbon, a bottle of gin, limes, simple syrup (which you can make for free with sugar and water), and Angostura bitters. With those five items you can make an Old Fashioned, a Gimlet, a Gin and Tonic (add tonic water), and a Gold Rush (bourbon, lemon, honey syrup). Add a bottle of light rum and you unlock Mojitos and Daiquiris. Add triple sec and you unlock Margaritas and Cosmos. Each new bottle you add opens several new recipes, not just one. That is the leverage of a well-chosen bar: a $15 bottle of triple sec might unlock five or six cocktails you could not make before.
The single biggest upgrade you can make to your home cocktails is using fresh citrus juice instead of bottled. Fresh lime juice and fresh lemon juice are transformative. Bottled citrus juice contains preservatives that give it a flat, slightly bitter taste that no amount of sugar can fix. A lime costs twenty cents and yields about an ounce of juice, which is enough for one cocktail. If you make cocktails more than occasionally, keep a bag of limes and lemons in your fridge. It is the difference between a cocktail that tastes like a bar made it and one that tastes like a mix.
Spirits fall into clear families that determine which cocktails they work in. Vodka is the most neutral, contributing alcohol and body without strong flavor. Gin is essentially flavored vodka, infused with juniper and botanicals. Light rum is clean and slightly sweet, while dark rum has deeper caramel and molasses notes. Bourbon and rye are both whiskeys: bourbon is sweeter and rounder (corn-based), rye is spicier and drier. Tequila is made from agave and has a distinctive earthy, vegetal quality. Scotch has smoky, peaty characteristics. Each spirit interacts differently with the same mixers, which is why a Moscow Mule (vodka, ginger beer, lime) and a Mexican Mule (tequila, ginger beer, lime) taste distinctly different despite sharing a structure.
These are the ingredients that turn simple mixed drinks into cocktails. Angostura bitters is a concentrated botanical extract used in dashes, not ounces. Two dashes in an Old Fashioned transforms bourbon and sugar from a sweetened shot into a complex, layered drink. Vermouth is a fortified, aromatized wine. Dry vermouth makes a Martini; sweet vermouth makes a Manhattan. Vermouth should be refrigerated after opening and used within a month, as it is wine and will oxidize. Liqueurs like triple sec (orange), Campari (bitter orange and herbs), Kahlua (coffee), and Amaretto (almond) each open specific families of cocktails. Campari alone, combined with gin and sweet vermouth, gives you a Negroni, one of the most respected cocktails in the world.