# Free Log Retention Period Estimator: Estimate Log Storage Requirements

:root{--lm-accent:rgb(15,15,215);--lm-bg:#f5f5f5;--lm-text:#041c35;--lm-muted:#6b7280;--lm-line:#e5e7eb}
*{box-sizing:border-box}.lm-estimator{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:64px 16px 80px;background:var(--lm-bg);color:var(--lm-text)}
.lm-inner{max-width:1120px;margin:0 auto}.lm-header{text-align:center;margin-bottom:28px}.lm-eyebrow{font-size:.875rem;font-weight:700;text-transform:uppercase;color:var(--lm-accent);margin-bottom:8px}.lm-title{font-family:Sora,sans-serif;font-size:clamp(1.75rem,4vw,3rem);line-height:1.12;margin:0 0 16px}.lm-subtitle{max-width:780px;margin:0 auto;font-size:1.05rem;line-height:1.65}
.lm-top-toggle{display:flex;justify-content:center;margin:0 0 28px}.lm-toggle{display:inline-flex;padding:4px;gap:4px;border-radius:999px;background:rgba(15,15,215,.08)}.lm-toggle button{border:0;background:transparent;padding:10px 18px;border-radius:999px;cursor:pointer;font-weight:600;color:#3f4650}.lm-toggle button.is-active{background:var(--lm-accent);color:#fff;box-shadow:0 7px 20px rgba(15,15,215,.3)}
.lm-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr);gap:30px;align-items:start}.lm-card{background:#fff;border-radius:28px;padding:28px;box-shadow:0 18px 45px rgba(15,23,42,.08)}.lm-card h3{font-size:1.15rem;margin:0 0 18px}.lm-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.lm-field{padding:15px;border-radius:18px;background:#f9fafb}.lm-field label{display:block;font-size:13px;font-weight:700;margin-bottom:7px}.lm-field-note{font-size:11px;line-height:1.45;color:#8a919d;margin-top:6px}.lm-input,.lm-select{width:100%;border:1px solid var(--lm-line);border-radius:999px;padding:10px 12px;background:#fff;font-size:14px;outline:0}.lm-input{text-align:right}.lm-select{text-align:left;-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.5 7.5l4.5 4.5 4.5-4.5z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:30px}.lm-input:focus,.lm-select:focus{border-color:var(--lm-accent);box-shadow:0 0 0 2px rgba(15,15,215,.12)}
.lm-reg-card{grid-column:1 / -1;padding:16px 18px;border-radius:18px;background:rgba(15,15,215,.05);border:1px solid rgba(15,15,215,.12);font-size:12.5px;line-height:1.6;color:#33415c}.lm-reg-card b{color:var(--lm-text)}
.lm-table-wrap{overflow-x:auto}.lm-table{width:100%;border-collapse:collapse;font-size:13px}.lm-table th{text-align:left;color:var(--lm-muted);font-size:12px;padding:7px 5px;border-bottom:1px solid var(--lm-line)}.lm-table td{padding:6px 5px;vertical-align:middle}.lm-table .num{text-align:right}.lm-group td{padding-top:14px;font-size:11px;font-weight:700;text-transform:uppercase;color:#9ca3af}.lm-badge-eps{display:inline-flex;padding:3px 8px;border-radius:999px;background:rgba(15,15,215,.08);color:var(--lm-accent);font-size:11px}.lm-small-input{width:84px;border:1px solid var(--lm-line);border-radius:999px;padding:7px 9px;text-align:right}.lm-settings{border-top:1px solid var(--lm-line);margin-top:18px;padding-top:18px}.lm-settings-title{font-weight:700;margin-bottom:13px}.lm-hidden{display:none!important}
.lm-output-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:14px}.lm-output-head h3{margin:0}.lm-live{padding:4px 10px;border-radius:999px;background:rgba(15,15,215,.08);color:var(--lm-accent);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.lm-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.lm-metric{background:#f9fafb;border-radius:16px;padding:12px}.lm-metric-label{font-size:12px;color:var(--lm-muted);margin-bottom:4px}.lm-metric-value{font-size:15px;font-weight:700}.lm-total{margin:18px 0;padding:22px;border:1px solid var(--lm-line);border-radius:22px;background:radial-gradient(circle at top left,rgba(15,15,215,.12),#fff 48%)}.lm-total-label{font-size:13px;color:var(--lm-muted);margin-bottom:5px}.lm-total-value{font-size:clamp(2rem,5vw,3.1rem);font-weight:800;line-height:1.1}.lm-btn{width:100%;display:inline-flex;justify-content:center;align-items:center;border:0;border-radius:999px;padding:12px 18px;background:var(--lm-accent);color:#fff;font-weight:700;cursor:pointer;box-shadow:0 12px 30px rgba(15,15,215,.3)}.lm-btn:hover{transform:translateY(-1px)}.lm-download-note,.lm-footnote{font-size:11px;color:#8a919d;line-height:1.55}.lm-download-note{margin-top:9px}.lm-footnote{margin-top:16px;padding-top:14px;border-top:1px solid var(--lm-line)}
@media(max-width:900px){.lm-grid{grid-template-columns:1fr}}@media(max-width:620px){.lm-estimator{padding:44px 12px 60px}.lm-card{padding:20px;border-radius:22px}.lm-form-grid,.lm-metrics{grid-template-columns:1fr}.lm-toggle{width:100%}.lm-toggle button{flex:1;padding:9px 10px;font-size:12px}}
Free tool

# Log Retention Period Estimator

Find the commonly recommended log retention periods for GDPR, NIS2, PCI DSS, HIPAA, ISO 27001, SOX, and other frameworks, then estimate the resulting log storage requirements. The result is intended as an indicative planning guideline and should not be considered legal advice.

Volume input modeEstimate from environmentI know my daily log volume





### Regulation / framework

FrameworkGDPR — security &amp; access logsNIS2 DirectivePCI DSS v4.0HIPAAISO/IEC 27001SOX (Sarbanes-Oxley)Custom / otherTypical guideline shown below. Edit the retention field if your policy differs.







### Environment

EmployeesUsed to estimate workstation and identity-related events.



ServersApplication, database, file and infrastructure servers.



Network &amp; security devicesFirewalls, switches, routers, VPN gateways, IDS/IPS and similar devices.



Average event sizebytes

700 bytes is a commonly used planning assumption.





### Known daily volume

Average log volumeGB / day

Use your current ingestion rate from your log management or SIEM platform.





Retention

Retention perioddays

Pre-filled from the selected framework. Override with your own policy at any time.



Immediately searchable (hot storage)days

Some frameworks (e.g. PCI DSS) require a portion of history to be immediately available for analysis.









### Estimated storage

Live estimate

Estimated EPS

0



Volume per day

0 GB



Retention period

365 days



Hot storage volume

0 GB





Total estimated storage

0 GB



Download calculation (.xlsx)The workbook contains the selected framework, entered assumptions and calculated results.

Retention periods shown are commonly referenced planning guidelines, not legal minimums. Requirements vary by country, sector, DPA guidance and your own risk assessment — confirm applicable obligations with legal or compliance counsel.






(function(){
'use strict';
const BYTES_PER_GB=1073741824, EMPLOYEE_EPS=2, SERVER_EPS=20, DEVICE_EPS=40;
const REGULATIONS={
 gdpr:{label:'GDPR — security & access logs',days:180,note:'GDPR does not set a fixed retention period for security/access logs. Under the storage limitation principle, logs should be kept only as long as necessary for the stated security purpose. <b>6–12 months is commonly applied for access and security logs; longer periods need a documented justification.'},
 nis2:{label:'NIS2 Directive',days:365,note:'The NIS2 Directive does not itself prescribe an exact number of months for log retention — national transposition and sector guidance vary. <b>12 months is a widely used planning baseline for incident-relevant logs, often aligned with existing ISO 27001 or GDPR practice.'},
 pci:{label:'PCI DSS v4.0',days:365,note:'PCI DSS v4.0 requirement 10.5.1: retain audit log history for at least <b>12 months, with a minimum of the most recent <b>3 months immediately available for analysis (hot storage).',hot:90},
 hipaa:{label:'HIPAA',days:2190,note:'HIPAA does not mandate a specific audit-log retention period, but the related documentation-retention rule (45 CFR §164.316(b)(2)(i)) requires records to be kept for <b>6 years from creation or last effective date — commonly mirrored for audit logs for consistency.'},
 iso27001:{label:'ISO/IEC 27001',days:365,note:'ISO/IEC 27001 does not fix a retention period; your risk assessment and documented logging policy define it (Annex A control A.8.15). <b>12 months is a common minimum baseline in practice; some organizations retain 2–3 years to support audits and trend analysis.'},
 sox:{label:'SOX (Sarbanes-Oxley)',days:2555,note:'Section 802 of the Sarbanes-Oxley Act requires relevant business records, including supporting audit documentation, to be retained for <b>7 years.'},
 custom:{label:'Custom / other',days:365,note:'Set your own retention period based on your internal policy, contractual obligations, or a framework not listed here.'}
};
let volMode='simple';
const $=id=>document.getElementById(id), num=el=>Math.max(0,parseFloat(el.value)||0);
const modeButtons=[...document.querySelectorAll('.lm-mode-btn')];
function number(v,d=0){return Number(v).toLocaleString('en-GB',{minimumFractionDigits:d,maximumFractionDigits:d})}
function storage(gb){if(!isFinite(gb)||gb<=0)return '0 GB';return gb>=1024?number(gb/1024,2)+' TB':number(gb,2)+' GB'}
function applyRegulation(){
 const reg=REGULATIONS[$('lm-regulation').value];
 $('lm-reg-card').innerHTML=reg.note;
 $('lm-retention-days').value=reg.days;
 if(reg.hot!==undefined)$('lm-hot-days').value=reg.hot;
 calculate();
}
function setVolMode(next){
 volMode=next;
 modeButtons.forEach(b=>b.classList.toggle('is-active',b.dataset.mode===volMode));
 $('lm-simple-panel').classList.toggle('lm-hidden',volMode!=='simple');
 $('lm-advanced-panel').classList.toggle('lm-hidden',volMode!=='advanced');
 calculate();
}
function calculate(){
 let eps=0,gbDay=0,eventSize=700,breakdown=[];
 const retention=Math.max(1,num($('lm-retention-days'))||365),hot=Math.max(0,num($('lm-hot-days'))||0);
 if(volMode==='simple'){
  const employees=num($('lm-employees')),servers=num($('lm-servers')),devices=num($('lm-devices'));
  eventSize=Math.max(1,num($('lm-event-size-simple'))||700);
  breakdown=[['Employees',employees,EMPLOYEE_EPS,employees*EMPLOYEE_EPS],['Servers',servers,SERVER_EPS,servers*SERVER_EPS],['Network & security devices',devices,DEVICE_EPS,devices*DEVICE_EPS]];
  eps=breakdown.reduce((s,r)=>s+r[3],0);
  gbDay=eps*eventSize*86400/BYTES_PER_GB;
 }else{
  gbDay=num($('lm-daily-gb'));
  eps=gbDay*BYTES_PER_GB/(eventSize*86400);
  breakdown=[['Known daily volume','',' ',gbDay+' GB/day']];
 }
 const totalGb=gbDay*retention, hotGb=gbDay*hot;
 window.__lmState={mode:volMode,regulation:$('lm-regulation').value,regulationLabel:REGULATIONS[$('lm-regulation').value].label,retention,hot,eventSize,gbDay,totalGb,hotGb,breakdown};
 $('lm-eps-display').textContent=volMode==='simple'?number(eps,0):'—';
 $('lm-day-display').textContent=number(gbDay,2)+' GB';
 $('lm-retention-display').textContent=number(retention,0)+' days';
 $('lm-hot-display').textContent=storage(hotGb);
 $('lm-storage-display').textContent=storage(totalGb);
}
function downloadXlsx(){
 if(typeof XLSX==='undefined'){alert('The spreadsheet library could not be loaded. Please check the page connection and try again.');return}
 calculate();
 const s=window.__lmState, rows=[];
 rows.push(['Logmanager Log Retention Calculation']);
 rows.push(['Generated',new Date().toLocaleString('en-GB')]);
 rows.push([]);
 rows.push(['INPUTS']);
 rows.push(['Parameter','Value']);
 rows.push(['Framework',s.regulationLabel]);
 rows.push(['Volume input mode',s.mode==='simple'?'Estimate from environment':'Known daily volume']);
 rows.push(['Average event size (bytes)',s.eventSize]);
 rows.push(['Retention period (days)',s.retention]);
 rows.push(['Hot / immediately searchable (days)',s.hot]);
 rows.push([]);
 rows.push(['SOURCE BREAKDOWN']);
 rows.push(['Source','Count','EPS per source','Total EPS / value']);
 s.breakdown.forEach(r=>rows.push(r));
 rows.push([]);
 rows.push(['RESULTS']);
 rows.push(['Parameter','Value']);
 rows.push(['Volume per day (GB)',s.gbDay]);
 rows.push(['Hot storage volume (GB)',s.hotGb]);
 rows.push(['Total estimated storage (GB)',s.totalGb]);
 rows.push(['Total estimated storage (TB)',s.totalGb/1024]);
 rows.push([]);
 rows.push(['Note: retention periods are commonly referenced planning guidelines, not legal minimums. Confirm applicable obligations with legal or compliance counsel.']);
 const ws=XLSX.utils.aoa_to_sheet(rows);ws['!cols']=[{wch:42},{wch:22},{wch:18},{wch:18}];
 const wb=XLSX.utils.book_new();XLSX.utils.book_append_sheet(wb,ws,'Retention Calculation');
 XLSX.writeFile(wb,'logmanager-log-retention-calculation-en.xlsx',{compression:true});
}
$('lm-regulation').addEventListener('change',applyRegulation);
modeButtons.forEach(b=>b.addEventListener('click',()=>setVolMode(b.dataset.mode)));
document.querySelectorAll('#lm-employees,#lm-servers,#lm-devices,#lm-event-size-simple,#lm-daily-gb,#lm-retention-days,#lm-hot-days').forEach(el=>el.addEventListener('input',calculate));
$('lm-download').addEventListener('click',downloadXlsx);
applyRegulation();
})();
