JSFiddle - React, Tailwind, and code Playground

HTML

<body>
    
<h2>This is a heading</h2>

    <p style="background-color:#ff0000">This is a paragraph.</p>
    <p style="background-color:#00ff00">This is a paragraph.</p>
    <p style="background-color:#0000ff">This is a paragraph.</p>
    <p>This is a paragraph.</p>
</body>

JavaScript

$(document).ready(function () {
    var first = 3;
    var second = 10;
    
    $("p").css({
		// (100% / first) - (second * 2)
        "width": "calc((100%/" + first + ") - (" + second " * 2))"
    });
});