Apartment hunting is a grind, especially in crowded cities like New York or San Francisco. You need to have a game plan and do your research to find the right rental for your budget. Here’s how to secure that great apartment at the right price.

1. Figure out what you can afford

Finding the right apartment starts with figuring out what you can realistically afford. Generally speaking, most experts advise that you don’t spend more than 30 percent of your gross (pre-tax) income on rent. The exact figure will depend on the specific city and general cost of living, but 30 percent is good a starting point.

Many landlords have a similar, more easy to use formula. Rental applications often will require that your gross income exceed 40 times your monthly rent. Just take your annual salary and divide by 40 and that figure should be the maximum that you pay for rent each month. If you do the math, either approach gets you the same number. Now that you know the most you can afford, what about fringe benefits?

2. Consider how fringe benefits impact your cost of living

What you spend on housing is more than just rent, right? Besides rent, you typically pay additional fees for online tenant screeningutilities, trash pickup, and other services. Those fees can really add up and impact your cost living, so you need to consider them when looking at rental property listings. For example, a slightly more expensive apartment might offer a flat rate on utilities, making it ultimately cheaper. Some apartment buildings with a strong online property management platform may offer a discount if you pay rent online, or before it’s due.

Then you have to think about transportation. An apartment closer to work might be more expensive but could eliminate the need to commute, again saving you money. The posted monthly rent is the first number you should look at, but make sure you consider your total monthly housing costs before you sign.

3. Find other ways to reduce rent

Just like buying a house, the sticker price is just a starting point. There are all kinds of ways to get a discount and the same is true when you’re looking at apartments. One popular method is to sign a multi-year lease for a discount. If you like the apartment and the neighborhood, it’s a no-brainer. Signing a 2-year lease can lower your rent and give you peace of mind, especially if you’re worried about rent going up.

Another trick is to pay up front. Obviously, this requires some savings, but landlords like getting cash up front and are often willing to offer a discount for the certainty that they’ll get paid. There are always ways to shave a few dollars off your rent, you just need to be creative.

If you follow these steps, you can find a great apartment at the right price for you. It’s easy to get sucked in by a great view or attractive amenities, but your wallet still speaks loudest. Figure out what you can afford but make sure to explore options to reduce your rent. Picking a building close to work or signing a longer lease can get you a great place at a reasonable price. Besides, you don’t want to have to look for a new place next year.