🛠️ToolsShed

Calculadora de Apalancamiento

Calcula ratios de apalancamiento financiero: DOL, DFL y DTL.

Preguntas Frecuentes

Implementación de Código

# Financial leverage calculation
def calculate_leverage(revenue, variable_costs, fixed_costs, interest=0):
    """Calculate DOL, DFL, and DTL"""
    contribution_margin = revenue - variable_costs
    ebit = contribution_margin - fixed_costs

    if ebit == 0:
        raise ValueError("EBIT cannot be zero")

    dol = contribution_margin / ebit
    dfl = ebit / (ebit - interest) if (ebit - interest) != 0 else float('inf')
    dtl = dol * dfl

    return {
        'contribution_margin': contribution_margin,
        'ebit': ebit,
        'dol': dol,
        'dfl': dfl,
        'dtl': dtl
    }

# Example: Software company
result = calculate_leverage(
    revenue=1_000_000,
    variable_costs=300_000,
    fixed_costs=400_000,
    interest=50_000
)

print(f"Contribution Margin: \${result['contribution_margin']:,.0f}")
print(f"EBIT: \${result['ebit']:,.0f}")
print(f"DOL: {result['dol']:.2f}x")
print(f"DFL: {result['dfl']:.2f}x")
print(f"DTL: {result['dtl']:.2f}x")

# Sensitivity analysis
revenue_change = 0.10  # 10% increase
ebit_change = revenue_change * result['dol']
eps_change = revenue_change * result['dtl']
print(f"10% revenue increase -> {ebit_change:.1%} EBIT increase")
print(f"10% revenue increase -> {eps_change:.1%} EPS increase")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.