How do calculate whether selling a product leads to profit? To simplify things, imagine a company which sells two products, A, and B, and it has two types of revenues, two types of variable costs, and 1 type of fixed costs.

I can calculate margins by taking revenue A - variable cost A, and revenue B - variable cost B. 

This tells me how much I make by selling each product. 

However, then I have fixed costs, and I can't really "attribute" them to A and B. 

My question is, how do I then decide which product is profitable to sell or not?

How do I "apply" fixed costs to my products? 

Do I give use weights? For example, if 50 % of my sales are of product A, then it gets 50% of fixed costs attributed to it, and thus my profits from selling A is 

revenue from A - variable costs from A - 50 % of fixed costs = profit from A

My interest lies in deciding whether I should scrap a product, or invest more in a product.
The process for solving this type of problem is very general--it's not a set of rules.  You don't need to attribute fixed costs to one good or the other (if there is only one fixed cost).

Here's the procedure:


Write out the whole profit function
Find the maximum of the profit function


If the maximum is less than the scrap value, then scrap it.

If your profit function is continuous, then you can maximize it by differentiating with respect to the quantity produced of the two inputs, setting the first order conditions to 0, and solving.  Just be sure to check that you have found the maximums and not the minimums.  If it is not continuous you will need to use a different method to find the maximums.

How to write the profit function?  

$$
\pi= TR(q_1,q_2) -TC(q_1,q_2)
$$

$TR$ is usually easy.  It's 

$$
TR(q_1,q_2) = P_1(q_1,q_2)\cdot q_1 + P_2(q_1,q_2)\cdot q_2
$$

Insert your price functions (which will be constants if you are a price-taker) and your cost function so that $\pi$ is a function only of $q_1$ and $q_2$.  Then find its max.  The $q_1$ and $q_2$ that maximize $\pi$ are what you want.

This type of problem seems hard if you get caught up letting your right brain trying to figure out how to solve it heuristically.  Don't do that.  Write out the profit function and maximize it.