Skip to content

Immobilien_Deal_Rechner #246

@irfanirfete1108-cell

Description

@irfanirfete1108-cell

from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill

wb = Workbook()
ws = wb.active
ws.title = "Deal Rechner"

Titel

ws["A1"] = "Immobilien Deal Rechner (konservativ)"
ws["A1"].font = Font(bold=True)

Eingaben

inputs = [
("Grundstückspreis", 550000),
("Abrisskosten", 50000),
("Wohnfläche (m²)", 700),
("Baukosten €/m²", 3000),
("Nebenkosten (%)", 0.15),
("Miete €/m²", 12),
("Mietabschlag (%)", 0.10),
("Liegenschaftszins", 0.045),
("Eigenkapital", 300000),
("Zinssatz Bank", 0.04),
("Tilgung", 0.02),
]

for i, (name, val) in enumerate(inputs, start=3):
ws[f"A{i}"] = name
ws[f"B{i}"] = val

Kosten

ws["A15"] = "Grundstück gesamt"
ws["B15"] = "=B3+B4"

ws["A16"] = "Baukosten"
ws["B16"] = "=B5*B6"

ws["A17"] = "Nebenkosten"
ws["B17"] = "=B16*B7"

ws["A18"] = "Gesamtkosten"
ws["B18"] = "=B15+B16+B17"

Miete

ws["A20"] = "Jahresmiete brutto"
ws["B20"] = "=B5B812"

ws["A21"] = "Jahresmiete sicher"
ws["B21"] = "=B20*(1-B9)"

Ertragswert

ws["A23"] = "Ertragswert"
ws["B23"] = "=B21/B10"

Finanzierung

ws["A25"] = "Fremdkapital"
ws["B25"] = "=B18-B11"

ws["A26"] = "Zinskosten"
ws["B26"] = "=B25*B12"

ws["A27"] = "Tilgung"
ws["B27"] = "=B25*B13"

ws["A28"] = "Annuität"
ws["B28"] = "=B26+B27"

Cashflow

ws["A30"] = "Cashflow"
ws["B30"] = "=B21-B28"

Rendite

ws["A32"] = "Eigenkapitalrendite"
ws["B32"] = "=B30/B11"

Bewertung

ws["A34"] = "Differenz"
ws["B34"] = "=B23-B18"

ws["A35"] = "Deal Bewertung"
ws["B35"] = '=IF(B34>0,"GUT","SCHLECHT")'

Farben

green = PatternFill(start_color="C6EFCE", end_color="C6EFCE", fill_type="solid")
red = PatternFill(start_color="FFC7CE", end_color="FFC7CE", fill_type="solid")

ws["B35"].fill = green

Datei speichern

wb.save("Immobilien_Deal_Rechner.xlsx")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions