# Attributable Risk Calculator what is the attributable risk?

The Attributable Risk Calculator is a tool used to determine the amount of risk that can be attributed to a specific factor. It is used to quantify the effect of a factor on the overall risk of a certain event or outcome. It can be used to compare the potential benefit of different interventions or treatments in a given population.

@import url(‘https://fonts.googleapis.com/css?family=Droid+Serif|Raleway’);

h1 {
text-align: center;
font-size: 50px;
margin-bottom: 0px;
font-family: ‘Raleway’, serif;
}

p {
color: black;
margin-bottom: 15px;
margin-top: 15px;
font-family: ‘Raleway’, sans-serif;
}

#words {
padding-left: 30px;
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
}

#words_summary {
padding-left: 70px;
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
}

#words_text {
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
}

#words_text_area {
display:inline-block;
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
padding-left: 100px;
}

#calcTitle {
text-align: center;
font-size: 20px;
margin-bottom: 0px;
font-family: ‘Raleway’, serif;
}

#hr_top {
width: 30%;
margin-bottom: 0px;
border: none;
height: 2px;
color: black;
background-color: black;
}

#hr_bottom {
width: 30%;
margin-top: 15px;
border: none;
height: 2px;
color: black;
background-color: black;
}

#words_table label, #words_table input {
display: inline-block;
vertical-align: baseline;
width: 350px;
}

#buttonCalc {
border: 1px solid;
border-radius: 10px;
margin-top: 20px;
padding: 10px 10px;
cursor: pointer;
outline: none;
background-color: white;
color: black;
font-family: ‘Work Sans’, sans-serif;
border: 1px solid grey;
/* Green */
}

#buttonCalc:hover {
background-color: #f6f6f6;
border: 1px solid black;
}

#words_table {
color: black;
font-family: Raleway;
max-width: 350px;
margin: 25px auto;
line-height: 1.75;
}

#words_table_input {
color: black;
font-family: Raleway;
max-width: 380px;
margin-left: 13%;
}

#summary_table {
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
padding-left: 20px;
}

.label_radio {
text-align: center;
}

td, tr, th {
border: 1px solid black;
}

td {
padding: 1px;
}

table {
border-collapse: collapse;
}

.label_radio {
text-align: center;
}

#text_area_input {
padding-left: 35%;
float: left;
}

svg:not(:root) {
overflow: visible;
}

td input {
max-width:60px;
max-height:30px;
}

This calculator finds the attributable risk, attributable risk percentage, and population attributable risk percentage for a given 2×2 contingency table.

Simply fill in the cells of the table below and then click “Calculate.”

Disease No Disease
Exposed
Not Exposed

Attributable Risk: 0.08077

Attributable Risk %: 53.30612

Population Attributable Risk %: 17.30718%

function calc() {

//get input data
var A = document.getElementById(‘A’).value;
var B = document.getElementById(‘B’).value;
var C = document.getElementById(‘C’).value;
var D = document.getElementById(‘D’).value;
var N = A – (-1*B) – (-1*C) – (-1*D);

//calculate stuff
var AR = (A/(A-(-1*B))) – (C/(C-(-1*D)));
var ARP = AR / (A/(A-(-1*B))) * 100;
var PAR = ( ((A-(-1*C)) / N) – (C/(C-(-1*D))) ) / ((A-(-1*C)) / N) * 100;

//output results
document.getElementById(‘AR’).innerHTML = AR.toFixed(5);
document.getElementById(‘ARP’).innerHTML = ARP.toFixed(5);
document.getElementById(‘PAR’).innerHTML = PAR.toFixed(5);

} //end calc function

x