Power analysis for survival studies was introduced in Stata 10.

Order Stata
Power analysis for survival studies 
Stata’s new stpower command provides samplesize and power calculations for survival studies that use Cox proportionalhazards regressions, logrank tests for two groups, or parametric tests of disparity in two exponential survivor functions.
stpower cox 
stpower logrank 
stpower exponential 
Stata’s new
The stpower commands allow automated production of customizable tables and have options to assist with creating graphs of power curves.
Below are several examples demonstrating some of stpower’s capabilities:
For an overview of all capabilities, see [ST] stpower.
Study design
Consider a survival study comparing two treatments, a standard treatment and
a new, experimental treatment. The survival probability in the control group
at the end of the study is expected to be approximately 0.7. We need to
estimate the sample size required to detect an increase in survival of the
experimental group from 0.7 to 0.8 at the end of the study with power of 80%,
85%, and 90%, using a twosided logrank test at the 5% significance level.
We use stpower logrank to obtain the required
sample sizes:
. stpower logrank 0.7 0.8, power(0.8 0.85 0.9)
Results
The table reports estimates of the required number of events and sample
sizes in the study for three powers given other study parameters. The last
row of the table indicates that we need 200 events to be observed in the
study (and a sample size of 794 to observe the 200 events in the study)
for our logrank test to have a power of 90%. The increase
in survival from 0.7 to 0.8 is equivalent to a hazard ratio of .626 of
the experimental to the control group, as shown in the secondtolast
column in the table.
If our sample size is predetermined, we may want to find out the smallest effect size or increase in survival expressed as a hazard ratio that can be detected with a given level of power. We can use stpower to produce power curves as a function of the hazard ratio for several sample sizes.
Suppose that we want to produce power curves as a function of the effect size for sample sizes of 100, 250, and 500 for the study we considered in the first example.
. stpower logrank 0.7, n(100 250 500) hratio(0.1(0.01)0.9) saving(mypower)
Powers are computed for each combination of samplesize and hazardratio values.
stpower also allows you to build your own customized tables. You can choose what to display in a table from a list of results available.
For example, if you prefer to see the probability of a type II error rather than power, and the proportion of subjects in the control group rather than groupsample sizes, reported by default, you can type
. stpower logrank 0.7 0.8, power(0.8 0.85 0.9) columns(beta n e p1 hr s1 s2 alpha)
to obtain the table with requested columns displayed in the same order you specified.
Of course, all the above can be done using dialog boxes instead of the command line.
For a complete list of what’s new in survival statistics, click here.