Long-run market: How long-run average cost is derived?

Long-run market: How long-run average cost is derived? In the long period a firm can expand his plants and equipments to increase the supply of output to the increased demand. In this period a firm can vary all its inputs. The division of factors into fixed and variable disappears in the long run.