How to properly annualize cost of initial investment

Let say you manage a supermarket chain and want to estimate profitability of a store over time, not only by using revenue and cost for a given unit of time - but also to include the initial investment for opening a given store.

How do you properly annualize the initial cost?

I see two problems:

1. Even if given inflation figures for each year since opening, I'm not sure how to properly divide the initial investment and apply inflation.

2. When comparing stores, longer running stores have 'positive bias' on profitability (all else kept equal), as the initial investment is divided by more units so the annualized cost is artificially lower.

An alternative is to consider the initial investment as part of the capital costs. For example, the initial investment may have been borrowed and you are currently paying interest on that loan. Or you can imagine that you bought capital (e.g. land and machines) with the investment and are renting those out to yourself, which you would subtract from your profits. This way you capture the (opportunity) cost of that capital. In a classic economics profit function, that corresponds to the $$r*K$$ part of the profit equation $$\Pi = p*y -w*L - r*K$$, where p are prices, y are output units, w are wages and L are labor amounts.