Reverse Stock Split Impact Calculator

Reverse Stock Split Impact Calculator

Calculate the impact of a reverse stock split on your holdings.

Companies often perform reverse splits to increase their stock price, which can help them meet exchange listing requirements or make the stock appear more attractive to certain institutional investors. However, it doesn't inherently change the company's underlying value.

Disclaimer: This calculator provides an estimate for illustrative purposes only and does not constitute financial advice. Actual outcomes may vary.

`; resultsArea.style.display = 'block'; resultsArea.scrollIntoView({ behavior: 'smooth' }); } async function generateSplitPdf() { const pdfContent = document.getElementById('pdf-content'); const downloadBtn = event.target; if (!pdfContent) { console.error("PDF content area not found."); if(typeof alert === 'function') alert("Error: Could not find content to generate PDF."); return; } if (!html2canvas || !jsPDF) { console.error("html2canvas or jsPDF library not found."); if(typeof alert === 'function') alert("Error: PDF generation library not loaded."); return; } const originalButtonText = downloadBtn.textContent; downloadBtn.textContent = "Generating..."; downloadBtn.disabled = true; const pdfHeaderElement = pdfContent.querySelector('.pdf-header'); const screenHeaderElement = pdfContent.querySelector('.screen-only'); if (pdfHeaderElement) pdfHeaderElement.style.display = 'block'; if (screenHeaderElement) screenHeaderElement.style.display = 'none'; try { const canvas = await html2canvas(pdfContent, { scale: 1.5, useCORS: true, logging: false, onclone: (doc) => { const clonedHeader = doc.querySelector('.pdf-header'); if (clonedHeader) clonedHeader.style.display = 'block'; const clonedScreenHeader = doc.querySelector('.screen-only'); if (clonedScreenHeader) clonedScreenHeader.style.display = 'none'; } }); if (pdfHeaderElement) pdfHeaderElement.style.display = 'none'; if (screenHeaderElement) screenHeaderElement.style.display = 'block'; const imgData = canvas.toDataURL('image/jpeg', 0.8); const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const imgProps = pdf.getImageProperties(imgData); const margin = 10; const contentWidth = pdfWidth - 2 * margin; const contentHeight = (imgProps.height * contentWidth) / imgProps.width; if (contentHeight <= pdfHeight - 2 * margin) { pdf.addImage(imgData, 'JPEG', margin, margin, contentWidth, contentHeight); } else { let remainingImgHeight = imgProps.height; let sourceY = 0; const sourceWidth = imgProps.width; const pageCanvasHeight = ((pdfHeight - 2 * margin) / contentWidth) * sourceWidth; while (remainingImgHeight > 0) { const currentChunkHeight = Math.min(remainingImgHeight, pageCanvasHeight); const tempCanvas = document.createElement('canvas'); tempCanvas.width = sourceWidth; tempCanvas.height = currentChunkHeight; const tempCtx = tempCanvas.getContext('2d'); tempCtx.drawImage(canvas, 0, sourceY, sourceWidth, currentChunkHeight, 0, 0, sourceWidth, currentChunkHeight); const chunkImgData = tempCanvas.toDataURL('image/jpeg', 0.8); pdf.addImage(chunkImgData, 'JPEG', margin, margin, contentWidth, (currentChunkHeight * contentWidth) / sourceWidth); remainingImgHeight -= currentChunkHeight; sourceY += currentChunkHeight; if (remainingImgHeight > 0) { pdf.addPage(); } } } const stockName = document.getElementById('stockName').value.replace(/\s+/g, '_') || "StockSplit"; pdf.save(`${stockName}_ReverseSplit_Impact.pdf`); } catch (error) { console.error("Error generating PDF:", error); if(typeof alert === 'function') alert("An error occurred while generating the PDF: " + error.message); } finally { downloadBtn.textContent = originalButtonText; downloadBtn.disabled = false; if (pdfHeaderElement) pdfHeaderElement.style.display = 'none'; if (screenHeaderElement) screenHeaderElement.style.display = 'block'; } }
Scroll to Top