Embed a pet calculator on your site

Four pawpetit calculators can sit on your own page: dog age, dog food, cat age and cat food. Paste one snippet where the calculator should appear. It is the same calculator as the full page here, with the same formulas and the same 3D dog or cat, in a box from 280 to 700 pixels wide.

Terms

The calculators are free to use on any site, as long as the “Calculator by Pawpetit” link stays in place. The numbers are estimates, not veterinary advice.

Two ways to embed

  • Script. A div and one small script. The script puts the calculator in a frame, keeps the frame as tall as its content, and adds the “Calculator by Pawpetit” link under it.
  • Plain iframe. For sites that do not allow scripts. The height is fixed, so there can be some empty space under the calculator on a wide page.

Dog age calculator

Convert your dog’s age to human years using the modern, size-adjusted method, not the old “multiply by 7” myth. See the full page.

Script (sets its own height)
<div data-pawpetit="dog-age-calculator"></div>
<script async src="https://pawpetit.com/embed.js"></script>
Plain iframe (fixed height)
<iframe src="https://pawpetit.com/embed/dog-age-calculator?credit=host" title="Dog age calculator" width="100%" height="560" style="border:0;max-width:700px" loading="lazy"></iframe>
<p><a href="https://pawpetit.com/dog-age-calculator" target="_blank" rel="noopener nofollow">Calculator by Pawpetit</a></p>

Dog food calculator

Estimate your dog’s daily calories and food portion from weight and activity level. See the full page.

Script (sets its own height)
<div data-pawpetit="dog-food-calculator"></div>
<script async src="https://pawpetit.com/embed.js"></script>
Plain iframe (fixed height)
<iframe src="https://pawpetit.com/embed/dog-food-calculator?credit=host" title="Dog food calculator" width="100%" height="800" style="border:0;max-width:700px" loading="lazy"></iframe>
<p><a href="https://pawpetit.com/dog-food-calculator" target="_blank" rel="noopener nofollow">Calculator by Pawpetit</a></p>

Cat age calculator

See how old your cat is in human years with the standard feline life-stage chart. See the full page.

Script (sets its own height)
<div data-pawpetit="cat-age-calculator"></div>
<script async src="https://pawpetit.com/embed.js"></script>
Plain iframe (fixed height)
<iframe src="https://pawpetit.com/embed/cat-age-calculator?credit=host" title="Cat age calculator" width="100%" height="480" style="border:0;max-width:700px" loading="lazy"></iframe>
<p><a href="https://pawpetit.com/cat-age-calculator" target="_blank" rel="noopener nofollow">Calculator by Pawpetit</a></p>

Cat food calculator

Estimate your cat’s daily calories, and how many cups or cans that is, from weight and life stage. See the full page.

Script (sets its own height)
<div data-pawpetit="cat-food-calculator"></div>
<script async src="https://pawpetit.com/embed.js"></script>
Plain iframe (fixed height)
<iframe src="https://pawpetit.com/embed/cat-food-calculator?credit=host" title="Cat food calculator" width="100%" height="880" style="border:0;max-width:700px" loading="lazy"></iframe>
<p><a href="https://pawpetit.com/cat-food-calculator" target="_blank" rel="noopener nofollow">Calculator by Pawpetit</a></p>

Options

  • Language. Add data-lang="ja" (日本語) or data-lang="zh-tw" (繁體中文) to the div. With a plain iframe, use /embed/ja/… or /embed/zh-tw/… in the address. These versions are metric (kg, and food energy per 100 g).
  • Light or dark. The calculator follows the visitor’s system setting. To fix it, add data-theme="light" or data-theme="dark" to the div, or &theme=dark to the end of the iframe address.
  • Width. The frame fills the space you give it, up to 700 pixels.

What the embed does on your page

  • The calculator runs in a frame served by pawpetit.com. What a visitor types stays in their browser.
  • The embed loads no analytics, no ads and no scripts or fonts from other companies, and the calculator itself sets no cookies.
  • The frame tells your page one thing, its height, so the script can size it: { pawpetit: "embed-height", slug: "dog-age-calculator", height: 512 }. The script reads that message only from pawpetit.com and only from the frame it made.
  • The 3D pet loads only when the calculator is near the screen, and not for visitors who ask for reduced motion or data saving. They see a still picture.