OPINION
PER CURIAM.Lolita Arango, a state prisoner proceeding pro se, appeals from the District Court’s order granting defendant’s motion to dismiss. Because the appeal does not present a substantial question, we will summarily affirm. See 3d Cir. LAR 27.4; 3d Cir. I.O.P. 10.6.
I.
In September 2008, Arango, an inmate incarcerated at SCI-Cambridge Springs, Pennsylvania, filed a pro se civil rights action against the prison superintendent, *665Rhonda Winstead, alleging that her due process rights were violated in connection with a disciplinary proceeding. Arango claimed that prison officials wrongly accused her of sexual harassment and failed to follow proper procedures in investigating the incident, resulting in a finding of misconduct. As punishment, Arango was subject to a thirty-day cell restriction and she was removed from participating in a Sex Offender Program for six months. Winstead moved to dismiss Arango’s complaint, and in July 2009, the District Court granted the motion, dismissing the case. The court concluded that Arango’s due process claim was not cognizable under 42 U.S.C. § 1983, as it was precluded by the “favorable termination rule” announced in Heck v. Humphrey, 512 U.S. 477, 114 S.Ct. 2364, 129 L.Ed.2d 383 (1994), and Edwards v. Balisok, 520 U.S. 641, 117 S.Ct. 1584, 137 L.Ed.2d 906 (1997). Arango now appeals from order of the District Court dismissing her complaint under Fed. R.Civ.P. 12(b)(6).
II.
We have jurisdiction over this appeal pursuant to 28 U.S.C. § 1291, and exercise plenary view over the District Court’s dismissal. See Santiago v. GMAC Mortgage Group, Inc., 417 F.3d 384, 386 (3d Cir.2005). Summary action is warranted when no substantial question is presented on appeal. See 3d Cir. LAR 27.4 and I.O.P. 10.6.
To survive a motion to dismiss, a complaint must contain sufficient factual matter, accepted as true, to “state a claim to relief that is plausible on its face.” Bell Atl. Corp. v. Twombly, 550 U.S. 544, 570, 127 S.Ct. 1955, 167 L.Ed.2d 929 (2007). “A claim has facial plausibility when the plaintiff pleads factual content that allows the court to draw the reasonable inference that the defendant is liable for the misconduct alleged.” Ashcroft v. Iqbal, — U.S. -, 129 S.Ct. 1937, 1949, 173 L.Ed.2d 868 (2009). The assumption of truth does not apply, however, to legal conclusions couched as factual allegations or to “[tjhreadbare recitals of the elements of a cause of action, supported by mere eonclusory statements.” Id.
The District Court ruled that Arango’s due process claim was not cognizable under 42 U.S.C. § 1983 because of the “favorable termination rule” announced in Heck and extended to prison disciplinary sanctions that alter the duration of the prisoner’s incarceration in Edwards. Under that rule, a § 1983 plaintiff cannot seek damages for harm caused by actions that implicate the validity of the fact or length of her confinement, unless she can prove that the sanction has been reversed, invalidated, or called into question by a grant of federal habeas corpus relief. Heck, 512 U.S. at 486-87, 114 S.Ct. 2364; Edwards, 520 U.S. at 646-48, 117 S.Ct. 1584. This bar applies not only to requests for money damages, but also to requests for equitable and declaratory relief. See Wilkinson v. Dotson, 544 U.S. 74, 81-82, 125 S.Ct. 1242, 161 L.Ed.2d 253 (2005). However, claims that relate only to the conditions, and not the fact or duration, of incarceration are not subject to the favorable termination rule. See Wilkinson, 544 U.S. at 82, 125 S.Ct. 1242; Torres v. Fauver, 292 F.3d 141, 145, 150 (3d Cir.2002).
Arango challenges the prison officials’ actions that resulted in her placement in 1’estricted housing for thirty days and removal from a prison program. Because these sanctions did not alter the length of her incarceration, the success of her claim would not “necessarily imply the invalidity” of the fact or duration of her confinement. Edwards, 520 U.S. at 646, 117 S.Ct. 1584; Torres, 292 F.3d at 150. Thus, Ar*666ango’s claim is not subject to the favorable termination rule and is cognizable under 42 U.S.C. § 1983.
Although Arango’s due process claim is cognizable under 42 U.S.C. § 1983, to survive a Fed.R.CivP. 12(b)(6) motion to dismiss, her complaint “must contain sufficient factual matter” to state a plausible claim of a deprivation of a liberty interest protected by the Due Process Clause. Iqbal, 129 S.Ct. at 1949. The Supreme Court has recognized that “[a]s long as the conditions or degree of confinement to which the prisoner is subjected is within the sentence imposed upon him and is not otherwise violative of the Constitution, the Due Process Clause does not in itself subject an inmate’s treatment by prison authorities to judicial oversight.” Asquithv. Dep’t of Corr., 186 F.3d 407, 410 (3d Cir.1999) (quoting Hewitt v. Helms, 459 U.S. 460, 468, 103 S.Ct. 864, 74 L.Ed.2d 675 (1983)). Due process applies only where the conditions of confinement impose “atypical and significant hardship[s] on the inmate in relation to the ordinary incidents of prison life.” Sandin v. Conner, 515 U.S. 472, 484, 115 S.Ct. 2293, 132 L.Ed.2d 418 (1995). Placement in administrative segregation for days or months at a time or transfers to more restrictive custody do not implicate a pro tected liberty interest. See Torres, 292 F.3d at 150; Fraise v. Terhune, 283 F.3d 506, 522-23 (3d Cir.2002). Nor does removal from a prison program, as restriction from participation in prison programs is among the conditions of confinement that an inmate may reasonably anticipate during her incarceration. See James v. Quinlan, 866 F.2d 627, 629 (3d Cir.1989). Therefore, Arango’s complaint, alleging that she was removed from a program and placed in thirty days restrictive housing, did not state a plausible violation of a protected liberty interest.
We have held that when a complaint is dismissed for failure to state a claim upon which relief may be granted, a plaintiff should be granted the opportunity to amend her complaint unless amendment would be inequitable or futile. Grayson v. Mayview State Hosp., 293 F.3d 103, 106 (3d Cir.2002). Given that, as discussed above, there are no facts to infer that Arango was deprived of a protected liberty interest, we conclude that it would have been futile for the District Court to provide Arango with leave to amend her complaint before granting the motion to dismiss.1
Because Arango’s due process claim implicated only the conditions, and not the fact or duration, of her confinement, the District Court erred in ruling that the claim was not cognizable under 42 U.S.C. § 1983. However, a Fed.R.Civ.P. 12(b)(6) dismissal was appropriate because Arango’s complaint did not state a deprivation of a protected liberty interest, and we will summarily affirm the District Court’s grant of defendant’s motion to dismiss for that reason. Appellant’s motion for a certificate of appealability is denied as unnecessary.
. Furthermore, Arango was provided with both notice and an opportunity to respond to this very issue, as defendant’s motion to dismiss argued that Arango's complaint failed to allege a protected liberty interest.