In the fullness of time, the one God revealed that he eternally exists as Father, Son, and Holy Spirit, and the doctrine of the Trinity is a biblical doctrine. But if you ask where the Trinity is clearly declared in scripture, you should take care to avoid certain common errors. One error is to dive immediately into prooftexting the doctrine by trying to locate verses which explicitly teach it.
The reason this is a mistake is that it ignores the kind of revelation the New Testament is. The New Testament is the inspired record of the apostolic generation looking back from its own time to the time before Jesus Christ ascended. Because of that, the New Testament is constantly referring backwards to the decisive events which took place in the life, death, and resurrection of Jesus Christ. A brief summary of those events: God sent his son to save sinners. The authors of the NT are all pointing back to an event in the past and saying, “What happened there is that God sent his son to save us.”
By the way, God has a son. A unique son, an eternal son, a son who is part of the definition of God. A son who never came into being, but always was, in communion with the Father and the Spirit.
By the time the epistles and gospels are being written, they all are retrospectively reflecting on the thing God did in the recent past, and on the new information about God that came along with that action.
The information (God has a son, God is triune) came along with the action. The information was not revealed for its own sake, simply so it could be known. God made known that he had an eternal Son when it was time for the eternal Son to come into the world to save sinners.
Where in the Bible is the Trinity revealed? Not in the Old Testament, which looks forward to the revealing of the Son; and not in the New Testament, which looks backward to the revealing of the Son. It is revealed in the historical events that take place between the testaments, the events which fulfill the expectation of the Old Testament and provoke the writing of the New Testament. The Trinity is revealed when the Trinity appears in history, when the Father sends the Son and pours out the Spirit on all flesh.
This explains why the New Testament almost offhandedly refers to the Trinity, presupposing it and never bothering to present it as a new idea. The fact that the Son has appeared for our salvation is behind every line of the New Testament, is the main point, is what’s New and what’s Testament about the New Testament.
In the picture of the two men carrying one cluster of grapes, you can see a portrayal of this truth. The picture uses, as a symbol, the two faithful spies returning from their reconnaisance at the valley of Eshkol, carrying an impressive giant cluster of grapes. The first spy carries the blessing on his back, but does not see it nor partake of it. The second spy, coming along in the footsteps of the first, carries the same blessing but follows it, sees it, and even (check out his hand) partakes of it. The first spy is the OT, the second spy the NT. Between them, not a doctrine or a disclosure of facts and information, but the reality of the blessing that came when the time was ripe.
The Trinity is in the Bible, not in the OT or the NT, but between them. “Between” does not mean in the intertestamental period of the Maccabees and such. “Between” does not mean the blank sheet of paper that divides the two testaments in your Bible. “Between” means in the central events on which all salvation history turns, the sending of the Son and the outpouring of the Spirit.