The math behind hiring and retention costs is often distressing for employers, so it's little surprise when hiring managers and recruiters look to turn the risky process of picking the best candidate into more of an exact science.

To that end, some larger enterprises have invested heavily in personality tests and assessment tools for decades. In recent years, more affordable and accessible tools have emerged, making it possible for even a Mom-and-Pop to put prospective new hires beneath the personality microscope.

The primary goal of personality testing is to go beyond the tangible skills that get discussed during the application and interview process. A veteran job applicant will know how to talk convincingly about how she sees herself as a perfect cultural fit, or how he once responded gracefully to a crisis. Interviewers are only human, and often make decisions on a hunch -- especially in the case of inexperienced hiring managers. A personality test puts a data-backed punch behind the hunch.

Like any tool, though, tests and assessments have limitations, especially when used incorrectly. Here are a few ways that personality tests are helping companies build better teams -- and a few ways that tests can cost businesses great talent and even cause legal trouble if improperly used.

Pro: Test what candidates will do, rather than what they say they've done

Polished candidates will come prepared with anecdotes attesting to their ability to perform under pressure. While these stories are hopefully true, they may not be the entire story. Maybe they can meet deadlines, but are quick to anger when experiencing stress. Maybe their IQ is off the charts, but their emotional intelligence is lacking. A personality test may help surface these concerns, or confirm the hiring manager's impressions.

Whether hiring execs or interns, companies are increasingly focused on the importance of cultural fits. Spotting a poor cultural fit can be challenging during a phone screening, or even an in-person interview. This is especially the case when a company defines its culture in non-specific or cliché terms (e.g. "we're a team of hard workers who go above and beyond, but have fun doing it"). Almost any candidate can make that case. A test can reveal red flags that may not be obvious in a conversation.

Con: Companies use the wrong tests in the wrong situations

Not all tests are created equal, and some assessments designed for one purpose (like career development) wind up being shoehorned into the hiring process. The well-known Myers-Briggs Type Indicator, for example, groups people into 16 different types, separating introverts from extroverts, the logically minded from the emotionally driven, and so on. While this could be seen as useful information for a tech company building out its sales team, or a restaurant hiring customer-facing staff, the company that offers the MBTI says using it for hiring is "unethical," stressing that personality type shouldn't be a dealbreaker for most positions.

Pro: Tests avoid unconscious biases

Diversity-minded businesses may use personality tests as another means of leveling the playing field between candidates. Unconscious biases from well-meaning recruiters and hiring managers still play a significant role in how company teams are put together.

"Unconscious bias is an innate human characteristic; even the most open-minded and well-meaning individuals unwittingly allow unconscious feelings to guide their decision-making," wrote Matt Mickiewicz in a 2016 article on biases in the hiring process.

Con: The test itself may be biased -- or worse

Personality tests have come under scrutiny in the past by the Equal Employment Opportunity commission. For example, some test questions may be framed in such a way that candidates suffering from mental illness will be disqualified. Make sure you consider the ramifications of what you're asking, and aren't inadvertently (and illegally) soliciting disclosures of disabilities.

Pro: Tests may improve candidate experience

A personality test doesn't have to feel like taking the SAT again. Startups like Knack reimagined the tests as mobile games that candidates may want to play even after they leave the office (and that they don't actually have to come to the office to play in the first place).

With employers increasingly focused on candidate experience, applying gamification theory to the hiring process can be an opportunity to stand out from the usual routine of multi-step interviews and cumbersome application materials.

Con: Recruiting, like entrepreneurship, sometimes requires a leap of faith

As always with data-driven initiatives in business, the data should only go so far. Many critical hires are made due to a "good feeling" that may have been overruled by test results. A personality test, if used, should always be one of many tools used in the hiring process, and red-flag questions with automatic disqualifications should be eliminated or closely examined.