DEV Community

Robin Beraud-Sudreau
Robin Beraud-Sudreau

Posted on

Will your property flip actually make money? A one-file margin check

Most flips look great on the back of an envelope: buy at 180k, sell at 280k, so 100k of profit. Then acquisition fees, a works overrun, eight months of carrying costs, loan interest and resale fees show up and the real figure shrinks.

I wanted a quick way to run those numbers without opening a spreadsheet each time, and without hiding my assumptions. So I wrote a Hermes skill, flip-margin-calculator, built around one standard-library Python script.

You give it a purchase price, a resale price and whatever else you know (works budget, contingency, holding months, monthly carrying costs, loan percentage and rate). It prints every assumption, a cost breakdown, net profit before tax, margin on resale price and on cost, return on equity, the break-even resale price, and the maximum purchase price for a target margin. A small sensitivity grid shows what happens if the resale price drops or the works run over.

python3 scripts/flip_margin.py --purchase-price 180000 \
  --resale-price 280000 --works-budget 35000 \
  --holding-months 8 --loan-ltc-pct 80 --target-margin 15
Enter fullscreen mode Exit fullscreen mode

The defaults for fees and contingency are placeholders and are labelled as such. It does not give tax advice and does not look up prices. It is a sanity check, not a verdict.

A --selftest option checks the arithmetic and the solvers.


Skill (MIT): https://github.com/RobinBeraud/hermes-skills/tree/main/finance/flip-margin-calculator
All skills: https://github.com/RobinBeraud/hermes-skills

This post was written with AI assistance and reviewed through automated checks.

Top comments (0)