- Calculate the Marked Price (MP) based on the Cost Price (CP). - Divide the stock into fractions as specified (half, quarter, rest = quarter). - Calculate the Selling Price (SP) for each fraction of the stock based on the discount applied to the MP. - Calculate the total SP by summing the revenues from all parts of the stock. - Calculate the overall gain or loss by comparing the total SP and total CP. - Calculate the overall gain percentage relative to the total CP. - Assuming a convenient value for CP or total quantity can simplify calculations.