OBJECTIVE: Our study aims to provide a paradigm when it is ethical to perform cardiopulmonary resuscitation (CPR) on patients during the COVID-19 pandemic. SUMMARY BACKGROUND DATA: Hospitals around the nation are enacting systems to limit CPR in caring for COVID+ patients for a variety of legitimate reasons and based on concepts of medical futility and allocation of scarce resources. No ethical framework, however, has been proposed as a standard to guide care in this crucial matter. METHODS: Our analysis begins with definitions of ethically relevant terms. We then cycle an illustrative clinical vignette through the mathematically permissible possibilities to account for all conceivable scenarios. Scenarios with ethical tension are examined. RESULTS: Patients have the negative right to refuse care including CPR, but they do not have the positive right to demand it. Our detailed ethical analysis and recommendations support CPR if and only if 1) CPR is judged medically beneficial, and in line with the patient's and values and goals, 2) allocations or scarce resources follow a just and transparent triage system, and 3) providers are protected from contracting the disease. CONCLUSIONS: CPR is an intervention like any other, with attendant risks and benefits and with responsibility for the utilization of limited resources. Our ethical analysis advocates for a systematic approach to codes that respects the important ethical considerations in caring for the critically ill and facilitates patient-centered, evidence-based, and fair treatment to all.