General steps involved in determining the optimal capital
structure often starts with the calculation of the Weighted Average Cost
of Capital (WACC). Usually a company uses a mix of both debt and equity
in its capital structure. WACC takes into consideration the overall
cost of capital of the company while evaluating how best to suffice the
additional funding requirement.

WACC is calculated as follows:

WACC = [{cost of debt * (1-t) * D/V} + {cost of equity * E/V}]

Where D = Value of Debt

E = Value of Equity

V = Total Value of Firm

Cost of debt = Interest rate required by debt-holders.

Cost of Equity = Expected rate of return calculated using the CAPM model.

an increase in balance sheet debt increases the cost of capital because debt is seen as a way of injecting equity