The agreement, struck in Edinburgh, has paved the way for a vote in autumn 2014, with a single Yes/No question on Scotland leaving the UK.
It will also allow 16 and 17-year-olds to take part in the ballot.
The SNP secured a mandate to hold the referendum after its landslide Scottish election win last year.
The UK government, which has responsibility over constitutional issues, will grant limited powers to the Scottish Parliament to hold a legal referendum, under a mechanism called Section 30.
David Cameron says the agreement includes “one simple, straightforward question”