The challenge facing the owners of rental properties was underscored by a man named Jimmy McMillan, who once ran for governor of New York on the-rent-is-too-(darn)-high platform.

In fact, that was what he dubbed his party: The Rent Is Too (Darn) High. (Footnote: He was later evicted from his rent-controlled apartment in New York City because his rent was too darn low.)

But that is the key question: How does a real estate investor avoid making the rent so darn high that potential residents are scared off, while keeping it high enough to make a buck?

The goal with any rental property, after all, is always positive cash flow — for a landlord to attract renters who will help him or her pay the mortgage (or, in the case of a house, pay it, period) while covering the costs of maintenance, repair and vacancies. According to one report, a landlord should strive to pocket a profit of somewhere in the neighborhood of six percent at the end of any given month.

The first factor to take into account when attempting to meet that goal involves the ancient axiom about location, location, location — location, as it pertains to the quality of a neighborhood as well as proximity to schools, public transportation, major thoroughfares and businesses.

Two other factors to consider are condition and competition. It stands to reason that upkeep is critical to a property’s appeal, and it pays to keep abreast of the competition in your area — even if it involves visiting comparable apartments to get some sense of what you’re up against.

Then there are amenities. They include such things as view (a garden vista is obviously more appealing than that of a parking lot, for instance), updates (state-of-the-art appliances, hardwood floors, etc.), spaciousness, layout and floor level (higher floors are generally more desirable).

All those things help determine market value, and a property’s rent is nothing more than a percentage of that. A professional appraiser can gauge fair market value by performing an inspection, and then a comparative market analysis.

There are also online tools, like Zillow’s Zestimate or Mashvisor’s investment property calculator, that enable a landlord to make such a determination on his or her own.

It is important, however, to be cognizant of larger market trends, and adjust the rent accordingly. Generally speaking if the economy is bad, there is greater demand for rentals, as consumer are more inclined to go that route than buy. Folks are also forced to downsize to smaller, cheaper apartments.

Additionally, the time of year can come into play. Demand often increases in the summertime, as renters with children seek to make a move before the school year begins.

When it comes to houses, the rule of thumb is that a landlord should charge between 0.8 percent and 1.1 percent of the home’s value — higher, if the home is worth $100,000 or less, lower if it’s worth over $350,000.

There are, however, flaws in that formula, in that it fails to take into account some of the above factors, like location, amenities, etc. There are those who believe a better range would be between 1.0 percent and 1.3 percent, depending upon the rent rates of similar properties in a given area.

All these factors can help a real estate investor find a happy medium — to charge rent that isn’t too darn high for potential renters, while remaining high enough to turn a profit.