This working paper describes how the IFS's model of the UK's long-run public finances (and those of its constituent nations) is constructed. Our model projects tax revenues, public spending and hence public borrowing and debt up to 2062-63. This is done for the UK as a whole and also separately for Scotland and the rest of the UK. The type of model we have built seeks to answer questions of the type 'is current fiscal policy sustainable without additional taxes needing to be raised or cuts to public spending imposed either now or in the future?'.