No, you'd have to extend the rent calculation to fifty or sixty years and beyond, because rent is never-ending.  And rent will always go up as  landlord's costs go up.

The housing calculation can stop at 25 years, because after 300 payments, the house is yours.  Pay the taxes and upkeep, and live for free otherwise.

Then compare the cost of renting vs ownership.