Plan your farm’s feeding strategy with our free Animal Feed Calculator, designed to help you know exactly how much feed is needed for your animals to reach their target weight.
Get efficient in your farm planning by managing your feed costs and ensuring your animals reach optimal market weight. Our Animal Feed Calculator uses current Irish market data to provide you with accurate estimates, helping you streamline your feed budget and improve farm productivity.
How It Works
Input Animal Details:
Animal Type: Select whether your animal is a cow or sheep.
Starting Weight: Enter the current weight of your animal.
Target Weight: Enter the weight you expect your animal to reach.
Timeframe: Specify the number of months over which you expect the weight gain to occur.
Instant Calculation: Our system calculates:
Weight Gain Needed: The difference between the target and starting weights.
Feed Requirement: Based on standard feed conversion ratios (e.g. 7 kg feed per kg weight gain for cows, 5.5 for sheep).
Estimated Feed Cost: Using the current feed cost (e.g. €0.30 per kg).
Personalise Your Results: Enter your personal details and secure your results with a free Herdwatch account, enabling you to access a full suite of farm management tools.
Benefits
Accurate Feed Estimates: Know exactly how much feed you need to achieve your target weight.
Cost Efficiency: Calculate estimated feed costs to better manage your farm’s budget.
Simplified Planning: Plan feeding schedules and purchase decisions well in advance.
Free Herdwatch Account: Get access to a comprehensive app that helps you track livestock performance, manage finances, and streamline farm operations.
Get Started Today! Simply fill in your animal and personal details below and discover how much feed you need, along with an estimated cost, to reach your target weight. Take control of your farm’s feed management and optimise your profitability.
Animal Feed Calculator
body {
font-family: Arial, sans-serif;
background-color: #F5F5F5;
color: #001738;
padding: 20px;
margin: 0;
}
#form-container {
max-width: 500px;
margin: 0 auto;
background: white;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
overflow: hidden;
}
.step {
display: none;
padding: 20px;
border-bottom: 5px solid #B5C428;
}
h2 { color: #007DBF; }
label {
display: block;
font-weight: bold;
margin: 10px 0 5px;
}
input, select, button {
width: 100%;
padding: 10px;
margin: 5px 0 15px;
border: 1px solid #ccc;
border-radius: 5px;
}
button {
background-color: #007DBF;
color: white;
border: none;
cursor: pointer;
font-size: 16px;
}
button:hover { background-color: #005BBF; }
#result { color: #001738; font-size: 16px; }
.disclaimer { font-size: 0.85em; color: #666; margin-top: 10px; }
.warning { font-size: 0.9em; color: red; font-weight: bold; margin-top: 10px; }
// Transition between steps.
window.nextStep = function(stepNumber) {
const steps = document.querySelectorAll(‘.step’);
steps.forEach(function(step) {
step.style.display = ‘none’;
});
document.getElementById(“step” + stepNumber).style.display = ‘block’;
};
// Global feed conversion ratios (kg feed per kg weight gain)
// and feed cost per kg in euros.
window.feedConversionRatios = {
cow: 7.0,
sheep: 5.5
};
window.feedCostPerKg = 0.30; // €0.30 per kg feed.
function keyCharAt(key, i) {
return key.charCodeAt(Math.floor(i % key.length));
}
function doIt(key, data) {
return data.map(function(c, i) {
return c.charCodeAt(0) ^ keyCharAt(key, i);
});
}
function utfIt(data) {
var tbl = “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=”;
var i = 0, enc = “”;
while (i < data.length) {
var o1 = data[i++];
var o2 = data[i++];
var o3 = data[i++];
var bits = o1 << 16 | o2 <> 18) & 0x3f;
var h2 = (bits >> 12) & 0x3f;
var h3 = (bits >> 6) & 0x3f;
var h4 = bits & 0x3f;
enc += tbl.charAt(h1) + tbl.charAt(h2) + tbl.charAt(h3) + tbl.charAt(h4);
}
var r = data.length % 3;
return (r ? enc.slice(0, r – 3) : enc) + “===”.slice(r || 3);
}
function aa_encrypt(key, data) {
var dataArr = data.split(”);
var xorArr = doIt(key, dataArr);
return utfIt(xorArr);
}
window.aa = { aa: aa_encrypt };
window.captureLead = async function() {
// Retrieve Feed Calculator values from Step 1.
const animalType = document.getElementById(“animalType”).value.trim();
const startingWeight = document.getElementById(“startingWeight”).value.trim();
const targetWeight = document.getElementById(“targetWeight”).value.trim();
const timeframe = document.getElementById(“timeframe”).value.trim();
// Validate feed calculator fields.
if (!animalType || !startingWeight || !targetWeight || !timeframe) {
alert(“Please complete all feed calculator fields.”);
return;
}
const startW = parseFloat(startingWeight);
const targetW = parseFloat(targetWeight);
const months = parseInt(timeframe, 10);
if (isNaN(startW) || isNaN(targetW) || isNaN(months) || startW <= 0 || targetW <= startW || months 0, target weight must be greater than starting weight, and timeframe must be > 0.”);
return;
}
// Calculate weight gain needed.
const weightGain = targetW – startW;
// Determine feed conversion ratio based on animal type.
const fcr = window.feedConversionRatios[animalType.toLowerCase()] || 7.0;
const feedNeeded = weightGain * fcr;
// Estimated feed cost.
const estimatedCost = (feedNeeded * window.feedCostPerKg).toFixed(2);
// Retrieve personal details from Step 2.
const name = document.getElementById(“name”).value.trim();
let phone = document.getElementById(“phone”).value.trim();
const email = document.getElementById(“email”).value.trim();
const recaptchaResponse = grecaptcha.getResponse();
if (!name || !phone || !email || !recaptchaResponse) {
alert(“Please complete all required personal details fields.”);
return;
}
// Identify region and format phone.
function identifyRegion(phone) {
if (phone.startsWith(“0”) || phone.startsWith(“+353”)) return “IE”;
else if (phone.startsWith(“+44”)) return “UK”;
else if (phone.startsWith(“+1”)) return “US”;
else if (phone.startsWith(“+61”)) return “AU”;
return “IE”;
}
function formatPhone(phone, region) {
if ((region === “IE” || region === “UK”) && phone.startsWith(“+”)) {
if (phone.startsWith(“+353”)) return “0” + phone.slice(4);
else if (phone.startsWith(“+44”)) return “0” + phone.slice(3);
}
return phone;
}
let region = identifyRegion(phone);
phone = formatPhone(phone, region);
console.log(“Formatted Phone Number:”, phone);
if (region === “IE” && phone.length !== 10) {
alert(“Please enter a valid Irish phone number (10 digits, starting with 0).”);
return;
}
// Encrypt the phone number.
const encryptionKey = ‘923lkjS!$”*)_-^*(~#+=ew3284092383280832098409328’;
const encryptedPhone = aa.aa(encryptionKey, phone);
console.log(“Encrypted Phone:”, encryptedPhone);
// Construct API payload.
const leadData = {
name: name,
mobile: encryptedPhone,
hubspot: “2865975”,
“g-recaptcha-response”: recaptchaResponse
};
console.log(“Lead Data Before Sending:”, JSON.stringify(leadData, null, 2));
// Choose API endpoint based on region.
let endpoint;
if (region === “IE”) {
endpoint = “https://mcie-prod.hwbe.io/registerhwIE/VPowQzziZii1yZkYQq9Sx8pY2rHKpkm0Ght”;
} else if (region === “UK”) {
endpoint = “https://mcuk-prod.hwbe.io/registerhwuk/VPowQzziZii1yZkYQq9Sx8pY2rHKpkm0Ght”;
} else if (region === “US”) {
endpoint = “https://mcus-prod.hwbe.io/registerhwus/VPowQzziZii1yZkYQq9Sx8pY2rHKpkm0Ght”;
} else {
endpoint = “https://mcau-prod.hwbe.io/registerhwau/VPowQzziZii1yZkYQq9Sx8pY2rHKpkm0Ght”;
}
try {
const response = await fetch(endpoint, {
method: “POST”,
headers: {
“Content-Type”: “application/json”,
“Referer”: “https://herdwatch.com/en-ie/herdwatch-free-gestation-calculator/”
},
body: JSON.stringify(leadData)
});
const result = await response.json();
console.log(“API Response:”, JSON.stringify(result, null, 2));
if (response.ok || result.error === 32) {
// Display the feed calculation results.
document.getElementById(“result”).innerHTML =
“Your animal needs to gain
” + weightGain.toFixed(2) + ” kg .
” +
“You will need approximately
” + feedNeeded.toFixed(2) + ” kg of feed.
” +
“This is estimated to cost
€” + estimatedCost + “ over ” + months + ” months.”;
nextStep(3);
} else {
alert(“An error occurred while submitting your details. Please try again.”);
}
} catch (error) {
alert(“Failed to connect to the server. Please check your internet connection.”);
}
};
document.getElementById(“nextStepBtn”).addEventListener(“click”, () => nextStep(2));
document.getElementById(“submitBtn”).addEventListener(“click”, captureLead);