Variety among products is manifested in terms of different attributes or features present in a product. Each attribute in its turn, may be built-in in the product at different levels, giving rise to an increased choice for the customer. However, higher level of an attribute, yielding higher utility for the customers, typically requires higher costs and commands higher price. Increasing price results in higher profit margin but lowers the attractiveness of the product to the customers. In this regard, product line optimization is concerned with the offering of a set of product variants to a large customer base, such that, certain objectives like maximization of buyers’ utility, seller’s return can be met. In this paper, a mathematical programming model has been developed, to determine the optimal product combination that fetches the maximum profit from a potential targeted market segment. Contrary to the existing formulations on product line optimization, where the pricing decision is determined exogenously, we consider simultaneous decision on pricing and product line optimization. Price is considered as a decision variable along with other attributes. Another major departure from the past models is the incorporation of costs associated with each level of attributes. These costs, used as input data, are justified, as the manufacturers typically use combinations of different modules to create different levels of the attributes. The resulting model became computationally complex and hence a greedy heuristic is developed for the purpose. An example is provided to illustrate the working of the heuristic. The same example has been solved for optimality, yielding identical solution to the heuristic results. Finally, a proposition has been presented to show the condition under which the heuristic will give the optimal solution.