There are two parts to this question. 

A) How big/healthy is the market you are trying to enter (or, what is your primary demand)? And, B) is there an opportunity within that market for you product (what is your secondary demand)?

To get a sense for the overall size of your market, you might try the chain-ratio method. That’s where you start with the total population and then whittle it down based on a series of refinements using assumptions about the percentage (or ratio) of people who meet certain criteria. For example, if you have a product that targets women between ages 40 and 60, you would start with the total U.S. population (let’s say 320 million for easy math) and then divide it by 2 for the total number of females, (now 160 million). Let’s say the average life is 80 years and the population is more or less evenly distributed across ages, so each decade has 20 million people, leading to 40 million women between the ages of 40 and sixty. Some of this data could then be verified by looking at census data, but we can bet we aren’t too far off. Multiply that number by the average sale price of the product to get the dollar volume of the market potential.

Sometimes you can also gather specific market sizes through industry resources or government economic data. Industry associations will often publish reports on market segment characteristics, which can be purchased directly or accessed through research agencies. Sometimes it is possible to call someone at the association and ask for basic statistics.

But knowing the market size alone does not tell you how healthy the market is. You need to know the size over time. Is it growing or shrinking? It is tough to grow in a shrinking market so try to gather this data. Tradeshow attendance numbers are also an indicator.

Related: How Do I Build a Business Plan? (Infographic)

Another way to assess market health is new product introductions. Does there appear to be a lot of innovation in the industry? If not, that may be a sign it is not getting a lot of attention for a good reason. It can also mean that an industry is ripe for disruption, so sometimes an “unhealthy," shrinking market can actually represent an opportunity.

As for B), assessing a particular product’s market opportunity can also be broken down into two parts: 1) how much volume can you hope to generate (market share) given the market size? 2) Will the market accept your product?

Once you have established market size in dollar volume, you multiply that by the percentage of market share you aim to capture. This is an area where many inventors or entrepreneurs make a big mistake. Having established the market size, they vastly over-estimate how quickly they can grab market share. They come up with a number that seems huge, and then say something like, “we only need to get 1 percent market share of iPhone cases and we’ll be rich!” Of course, there are like hundreds of thousands of iPhone cases on the market and not one of them has 1 percent market share, but it always seems so easy to get “just 1 percent.”

Related: How to Make Sure There's a Market for Your Business Idea

The much more useful way to predict your eventual market opportunity is to calculate it by the number of stores you might get into, what the initial sell-in number might be and then the expected monthly turnover per store in an ongoing basis. If you sell into a chain with 20 stores, they might buy 4 units per store inventory to start, and then sell one per store per month (again, an area where people tend to dramatically overestimate: sell-through. Lots of products sell one per store per week or month). Or maybe it is a chain with 2,500 stores. Either way, you can do the math, and as more accounts are added, they cumulate. But the stores add over time and there is often a lag between the opening order and the first re-orders. This method will yield much more realistic sales targets, often a small fraction at what is arrived at the other way. I call it working forward instead of working backwards.

Lastly, how do you market test your specific idea? Well, the best way to test something is to simulate as closely as possible the retail environment and see how the product performs. This can be accomplished by testing in a few local stores if you can produce product, or if you want to keep virtual, you can set up a dummy site that looks real and try and get orders, without actually taking money from people to see if you can get people to bite on your idea. Or lastly, and the method I am by far most excited about, is that you can set up and run a crowd-funding campaign on a site like Kickstarter or Indiegogo and see if it gains traction. 

Related: 5 Essential Ingredients of a Winning Business Idea