Parable of the Wise and the Foolish Builders
The Parable of the Wise and the Foolish Builders (also known as the House on the Rock), is a parable of Jesus from the Sermon on the Mount in the Gospel of Matthew (7:24–27) as well as in the Sermon on the Plain in the Gospel of Luke (6:46–49).
The parable illustrates the importance of building one's life on obedience to the teachings and example of Jesus.
Everyone therefore who hears these words of mine, and does them, I will liken him to a wise man, who built his house on a rock. The rain came down, the floods came, and the winds blew, and beat on that house; and it didn't fall, for it was founded on the rock. Everyone who hears these words of mine, and doesn't do them will be like a foolish man, who built his house on the sand. The rain came down, the floods came, and the winds blew, and beat on that house; and it fell—and great was its fall.— Matthew 7:24–27, World English Bible
Matthew's summary of Jesus' sayings, noting that "the people were astonished at his teaching", follows immediately after this parable.
This parable emphasizes the need to put Jesus' teachings into practice, and speaks of "two sorts of people whose hearts are revealed in their actions".
Matthew's version of the parable has a "more complex narrative structure"  than Luke's, mentioning rain and winds as well as floods. These forces are usually interpreted ethically, as trials of life that can be resisted by a life founded on Christian doctrine, but can also be interpreted eschatologically.
By "rain" here, and "floods," and "winds," He is expressing metaphorically the calamities and afflictions that befall men; such as false accusations, plots, bereavements, deaths, loss of friends, vexations from strangers, all the ills in our life that any one could mention. "But to none of these," says He, "does such a soul give way; and the cause is, it is founded on the rock." He calls the steadfastness of His doctrine a rock; because in truth His commands are stronger than any rock, setting one above all the waves of human affairs. For he who keeps these things strictly, will not have the advantage of men only when they are vexing him, but even of the very devils plotting against him. And that it is not vain boasting so to speak, Job is our witness, who received all the assaults of the devil, and stood unmoveable; and the apostles too are our witnesses, for that when the waves of the whole world were beating against them, when both nations and princes, both their own people and strangers, both the evil spirits, and the devil, and every engine was set in motion, they stood firmer than a rock, and dispersed it all.
Cornelius a Lapide gives a similar interpretation, writing, "The rain, wind, and rivers are all temptations and adversities whatsoever, whether coming from the world, the flesh, or the devil. They also mean the condemnation which Christ shall pronounce upon the wicked in the Day of Judgment. For this is often expressed in Scripture by the words storm and Tempest, as in Isaiah 28:2, “Behold the Lord hath a mighty and strong one, which as a tempest of hail and a destroying storm, as a flood of mighty waters overflowing, shall cast down to the earth with the hand.” 
My hope is built on nothing less
Than Jesus' blood and righteousness.
I dare not trust the sweetest frame,
But wholly trust in Jesus' Name.
On Christ the solid Rock I stand,
All other ground is sinking sand;
All other ground is sinking sand.
- Matthew 7:28
- Joel B. Green, The Gospel of Luke, Eerdmans, 1997, ISBN 0-8028-2315-7, pp. 277, 281.
- Richard N. Longenecker, The Challenge of Jesus' Parables, Eerdmans, 2000, ISBN 0-8028-4638-6, pp. 287–89.
- Chrysostom's Homily 24 on Matthew, New Advent.
- Lapide, Cornelius (1889). The great commentary of Cornelius à Lapide. Translated by Thomas Wimberly Mossman. London: John Hodges.
- Blomberg, C.L. (2012). Interpreting the Parables. InterVarsity Press. ISBN 978-0-8308-6677-9.
- Gowler, D.B. (2017). The Parables after Jesus: Their Imaginative Receptions across Two Millennia. Baker Publishing Group. ISBN 978-1-4934-0666-1.
- Jones, Peter Rhea (2012). "On Rock or Sand? The Two Foundations (Matthew 7:24–27, Luke 6:46–49)". Review & Expositor. SAGE Publications. 109 (2): 233–249. doi:10.1177/003463731210900208. ISSN 0034-6373.
- Ottenheijm, Eric. "Learning And Practising: Uses Of An Early Jewish Discourse In Matthew (7:24–27) And Rabbinic Literature". Interaction between Judaism and Christianity in History, Religion, Art and Literature. Brill. pp. 45–64. doi:10.1163/ej.9789004171503.i-626.15. ISBN 978-90-04-17150-3.
- Taylor, Jerry (2008). "Two Houses in a Storm (Matthew 7.24-29)". Leaven. 16 (4).