Googling around I found a particular page:PCB Via CalculatorLooking the page code I found in the JavaScript code://copyright circuitcalculator.com//please do not copy without permissionTaking in account the simplicity of this code, can I write my own JavaScript function for this? I think some related links can be useful.UPD: So, talking more specifically this code cannot be accused in any sense?
Copyrighting simple JavaScript code
licensing;legal
Their About page pretty much sums it up:  No, you can't directly copy their code.That doesn't preclude you from writing your own version of those calculations though.  It's their expression of how those calculations are performed that is copyrighted, not the calculations themselves.So Yes, you can write your own version of those calculations.You are also allowed to look at their implementation to provide guidance with creating your implementation so long as you are not performing a direct copy or equivalent.  You need to have some originality to your code, which could consist of different variable or method names; different invocations; handling of units in a different fashion; etc....  The originality is what makes your code new work instead of a derivative of theirs.CopyrightsThe web calculator scripts on this site are copyrighted and may not be  used outside of this site without permission. Copying and re-posting  on another site without licensing is strictly prohibited. Contact us  if you would like to license a script or if you are in need of a  custom script.The Excel files, Excel VBA code, and SPICE models may be freely used  as desired.