đŸ› ïžToolsShed

Rental Yield Calculator

Calculate gross and net rental yield, cap rate, and cash-on-cash return for investment properties.

Questions Fréquentes

Implémentation du Code

def rental_yield(
    property_price: float,
    monthly_rent: float,
    annual_expenses: float = 0,
    vacancy_rate_pct: float = 0,
) -> dict:
    """Calculate rental yield metrics for an investment property."""
    annual_rent = monthly_rent * 12
    effective_rent = annual_rent * (1 - vacancy_rate_pct / 100)

    gross_yield = (annual_rent / property_price) * 100
    net_income = effective_rent - annual_expenses
    net_yield = (net_income / property_price) * 100

    # Cap rate uses Net Operating Income (before financing)
    cap_rate = (net_income / property_price) * 100

    return {
        "gross_yield_pct": round(gross_yield, 2),
        "net_yield_pct": round(net_yield, 2),
        "cap_rate_pct": round(cap_rate, 2),
        "annual_gross_income": round(effective_rent, 2),
        "annual_net_income": round(net_income, 2),
        "monthly_net_income": round(net_income / 12, 2),
    }

result = rental_yield(
    property_price=350_000,
    monthly_rent=1_800,
    annual_expenses=5_000,  # maintenance, insurance
    vacancy_rate_pct=5,
)
for k, v in result.items():
    print(f"{k}: {v}")

Comments & Feedback

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