body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.calculator-wrapper {
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 8px;
padding: 30px;
margin-bottom: 40px;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.calc-header {
text-align: center;
margin-bottom: 25px;
}
.calc-header h2 {
margin: 0;
color: #2c3e50;
}
.input-group {
margin-bottom: 20px;
}
.input-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #495057;
}
.input-group input {
width: 100%;
padding: 12px;
border: 1px solid #ced4da;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.input-group input:focus {
border-color: #007bff;
outline: none;
box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}
.help-text {
font-size: 0.85em;
color: #6c757d;
margin-top: 5px;
}
button.calc-btn {
width: 100%;
padding: 14px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
font-size: 18px;
font-weight: 600;
cursor: pointer;
transition: background-color 0.2s;
}
button.calc-btn:hover {
background-color: #0056b3;
}
#result-area {
margin-top: 25px;
display: none;
background-color: #fff;
border: 1px solid #dee2e6;
border-radius: 4px;
padding: 20px;
}
.result-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #eee;
}
.result-row:last-child {
border-bottom: none;
}
.result-label {
color: #666;
font-weight: 500;
}
.result-value {
font-weight: 700;
color: #2c3e50;
font-size: 1.1em;
}
.highlight {
color: #28a745;
font-size: 1.3em;
}
.article-content {
margin-top: 50px;
background: #fff;
}
.article-content h2 {
border-bottom: 2px solid #007bff;
padding-bottom: 10px;
margin-top: 30px;
color: #2c3e50;
}
.article-content h3 {
color: #495057;
margin-top: 25px;
}
.article-content ul {
background-color: #f8f9fa;
padding: 20px 40px;
border-radius: 6px;
}
.formula-box {
background-color: #e8f4fd;
padding: 15px;
border-left: 4px solid #007bff;
font-family: monospace;
font-size: 1.1em;
margin: 20px 0;
}
function calculateAllotment() {
// Get input values
var totalAvailable = parseFloat(document.getElementById('totalAvailable').value);
var totalApplied = parseFloat(document.getElementById('totalApplied').value);
var userApplied = parseFloat(document.getElementById('userApplied').value);
// Validation
if (isNaN(totalAvailable) || isNaN(totalApplied) || isNaN(userApplied) || totalAvailable < 0 || totalApplied < 0 || userApplied < 0) {
alert("Please enter valid positive numbers for all fields.");
return;
}
if (totalApplied === 0) {
alert("Total applications cannot be zero.");
return;
}
// Logic
var allotmentRatio = 0;
var subscriptionTimes = totalApplied / totalAvailable;
var allottedUnits = 0;
var percentRec = 0;
// If undersubscribed or exactly subscribed, everyone gets what they asked for (up to the limit of their request)
if (totalApplied <= totalAvailable) {
allotmentRatio = 1; // 100%
allottedUnits = userApplied; // You get what you asked for
} else {
// Oversubscribed – Pro Rata applies
allotmentRatio = totalAvailable / totalApplied;
// Calculate raw units
var rawAllotment = userApplied * allotmentRatio;
// Floor the value because you usually can't receive fractional shares
allottedUnits = Math.floor(rawAllotment);
}
// Calculate remainder
var unallottedUnits = userApplied – allottedUnits;
if (unallottedUnits 0) {
percentRec = (allottedUnits / userApplied) * 100;
} else {
percentRec = 0;
}
// Display Results
document.getElementById('result-area').style.display = 'block';
// Subscription status e.g. "5x oversubscribed"
document.getElementById('resSubscriptionTimes').innerText = subscriptionTimes.toFixed(2) + "x";
// Ratio text e.g. "1 : 5"
var simplifiedTotal = Math.round(totalApplied / totalAvailable * 10) / 10;
if (allotmentRatio === 1) {
document.getElementById('resRatio').innerText = "1 : 1 (Full Allotment)";
} else {
document.getElementById('resRatio').innerText = "Approx. " + allotmentRatio.toFixed(4) + " (or 1 for every " + (1/allotmentRatio).toFixed(2) + " applied)";
}
document.getElementById('resAllotted').innerText = allottedUnits.toLocaleString();
document.getElementById('resRefund').innerText = unallottedUnits.toLocaleString();
document.getElementById('resPercent').innerText = percentRec.toFixed(2) + "%";
}
How to Calculate Pro Rata Allotment
In the world of finance, inventory management, and resource distribution, pro rata allotment is a method used to distribute a limited quantity of items among a group of applicants whose total demand exceeds the supply. This is most commonly seen in Initial Public Offerings (IPOs) where a company issues shares, but the demand from investors is significantly higher than the number of shares available.
When an issue is "oversubscribed," the issuer cannot fulfill every request in full. Instead, they use a proportional calculation to ensure fair distribution. This calculator helps you determine exactly how many units you will receive based on the aggregate demand.
The Pro Rata Formula
The core concept of pro rata is proportionality. The formula calculates a ratio based on the total supply versus total demand, and applies that ratio to your individual application.
Allotment Ratio = Total Available Units / Total Applied Units
To find your individual allotment:
Your Allotment = Your Applied Quantity × Allotment Ratio
Note: In most real-world scenarios (like share allotments), fractional units are not permitted. Therefore, the result is typically rounded down to the nearest whole integer.
Step-by-Step Calculation Example
Let's look at a practical example involving a stock IPO to understand how the math works.
- Total Shares Issued: 100,000 shares
- Total Bids Received: 500,000 shares
- Your Bid: 1,000 shares
Step 1: Determine the Oversubscription
First, we see how many times the issue was oversubscribed.
500,000 / 100,000 = 5 times. This means for every 1 share available, there are 5 people wanting it.
Step 2: Calculate the Ratio
We calculate the ratio of availability:
100,000 / 500,000 = 0.2 (or 20%).
Step 3: Apply to Your Request
Multiply your request by the ratio:
1,000 shares × 0.2 = 200 shares.
In this scenario, you would be allotted 200 shares, and you would be refunded the cost of the remaining 800 shares.
Why Use a Pro Rata Calculator?
While the math seems simple for round numbers, real-world figures are often complex. An IPO might be oversubscribed by 73.4 times, or you might apply for an irregular number of units like 345. A calculator ensures you don't make rounding errors and provides an immediate estimation of your success probability.
Factors Influencing Allotment
While this calculator provides a pure mathematical pro rata calculation, keep in mind that other factors may influence the final decision:
- Lot Sizes: Some distributions require shares to be allocated in specific lot sizes (e.g., multiples of 10 or 100).
- Minimum Allotment: Regulators often mandate a minimum allotment (e.g., 1 share) to as many applicants as possible before applying pro rata to the remainder.
- Category Reservation: In IPOs, specific percentages are reserved for Retail Investors, HNIs, and Institutional Buyers. You must calculate the pro rata ratio specifically for your category, not the total IPO.