Clinicians and researchers alike are increasingly interested in how best to personalize interventions. A dynamic treatment regimen is a sequence of prespecified decision rules which can be used to guide the delivery of a sequence of treatments or interventions that is tailored to the changing needs of the individual. The sequential multiple-assignment randomized trial is a research tool which allows for the construction of effective dynamic treatment regimens. We derive easy-to-use formulae for computing the total sample size for three common two-stage sequential multiple-assignment randomized trial designs in which the primary aim is to compare mean end-of-study outcomes for two embedded dynamic treatment regimens which recommend different first-stage treatments. The formulae are derived in the context of a regression model which leverages information from a longitudinal outcome collected over the entire study. We show that the sample size formula for a sequential multiple-assignment randomized trial can be written as the product of the sample size formula for a standard two-arm randomized trial, a deflation factor that accounts for the increased statistical efficiency resulting from a longitudinal analysis, and an inflation factor that accounts for the design of a sequential multiple-assignment randomized trial. The sequential multiple-assignment randomized trial design inflation factor is typically a function of the anticipated probability of response to first-stage treatment. We review modeling and estimation for dynamic treatment regimen effect analyses using a longitudinal outcome from a sequential multiple-assignment randomized trial, as well as the estimation of standard errors. We also present estimators for the covariance matrix for a variety of common working correlation structures. Methods are motivated using the ENGAGE study, a sequential multiple-assignment randomized trial aimed at developing a dynamic treatment regimen for increasing motivation to attend treatments among alcohol- and cocaine-dependent patients.