cap-rate.com

Embeddable cap rate analyzer for agents and investor clubs

Copy one snippet and you get a free embeddable cap rate calculator. It runs on your page, with no tracking and no account.

What the embeddable cap rate calculator does

Your visitor enters the price, monthly rent and yearly costs. The widget shows the cap rate and the NOI on one line.

It uses the same formula as the cap rate calculator. To work out the cap rate, take the yearly rent and subtract the costs to get NOI. Then divide NOI by the price.

Make a copy of this snippet

Paste the snippet wherever you want the calculator to show up. You don't need an account, and the calculator loads nothing from other servers.

<section id="cr-embed">
<style>
#cr-embed{width:100%;max-width:26rem;padding:1rem;border:1px solid #CBD5C4;border-radius:3px;background:#fff;color:#1E2320;font-family:Georgia,serif;line-height:1.45}
#cr-embed b{display:block;margin-bottom:.6rem}
#cr-embed label{display:block;margin-bottom:.6rem}
#cr-embed input{display:block;width:100%;box-sizing:border-box;min-height:44px;margin-top:.25rem;padding:0 .6rem;border:1px solid #848E86;border-radius:3px;font:inherit}
#cr-embed output{display:block;min-height:1.4rem;font-weight:bold}
#cr-embed small{display:block;margin-top:.5rem}
#cr-embed a{color:#7A5A00}
</style>
<b>Cap rate calculation tool</b>
<label>Purchase price<input id="cr-embed-price" inputmode="decimal"></label>
<label>Monthly rent<input id="cr-embed-rent" inputmode="decimal"></label>
<label>Yearly costs, vacancy included<input id="cr-embed-cost" inputmode="decimal"></label>
<output id="cr-embed-out" aria-live="polite"></output>
<small>The full analyzer is at <a href="https://cap-rate.com/">cap-rate.com</a>.</small>
</section>
<script>(function(){var d=document,g=function(i){var v=parseFloat((d.getElementById('cr-embed-'+i).value||'').replace(/[^0-9.]/g,''));return isFinite(v)?v:0},m=function(x){return '$'+Math.round(x).toString().replace(/\B(?=(\d{3})+(?!\d))/g,',')};function run(){var p=g('price'),r=g('rent'),c=g('cost')||0,o=d.getElementById('cr-embed-out'),neg=['price','rent','cost'].some(function(i){return /^\s*[-\u2212]/.test(d.getElementById('cr-embed-'+i).value)});var bad=['price','rent','cost'].some(function(i){var t=(d.getElementById('cr-embed-'+i).value||'').trim();return t&&(/[^0-9.,$\s]/.test(t)||!/\d/.test(t))});if(neg||bad||(d.getElementById('cr-embed-price').value.trim()&&!p)||(d.getElementById('cr-embed-rent').value.trim()&&!r)){o.textContent='Enter amounts as positive numbers.';return}if(!p||!r){o.textContent='';return}if(p<1000){o.textContent='Enter the full purchase price in dollars.';return}var n=r*12-c;o.textContent='Cap rate '+(n/p*100).toFixed(2)+'%: NOI '+(n<0?'\u2212':'')+m(Math.abs(n))+' on a '+m(p)+' price.'}d.getElementById('cr-embed').addEventListener('input',run)})();</script>

Its appearance on your page

Cap rate calculation tool The full analyzer is at cap-rate.com.