A declaratory judgment clarifies legal rights without necessarily ordering anyone to do anything.
A declaratory judgment action asks a court to formally declare the legal rights and obligations of the parties, without necessarily ordering any specific action — a notably different goal from mandamus, which exists specifically to compel action.
The core distinction
Mandamus results in a command: do this specific thing. A declaratory judgment results in a clarification: here is what the law requires or permits in this situation. In some cases, a declaratory judgment can serve as a useful precursor, establishing the legal duty clearly before a party seeks mandamus to enforce it.
When declaratory relief alone might be enough
If a petitioner primarily needs legal clarity — for example, confirmation of how a statute applies to their situation — rather than an urgent order compelling immediate action, a declaratory judgment action may accomplish the goal with less friction than a mandamus proceeding, since it does not require establishing the same "clear duty, no adequate remedy" framework.
When both remedies are sought together
Complaints in federal agency litigation frequently combine a request for declaratory relief (a ruling that the agency's interpretation of the law is incorrect, or that a duty exists) with a request for mandamus or injunctive relief (an order that the agency must act consistently with that ruling).
Procedural differences
Declaratory judgment actions in federal court are authorized broadly under the Declaratory Judgment Act, 28 U.S.C. §§ 2201–2202, and do not carry the same "extraordinary remedy" characterization that mandamus does, generally making them somewhat more available across a broader range of disputes.
A strategic note
Petitioners uncertain whether their facts satisfy the strict mandamus standard sometimes plead a declaratory judgment claim as an alternative theory, giving the court a path to rule in their favor even if it is unwilling to grant the more extraordinary mandamus relief.